bring cloud;
let my = new cloud.Bucket();
inflight class Foo {
pub do() {}
}
let foo = inflight (): Foo => {
return new Foo();
};
test "test" {
foo().do();
}
This happened:
Error: Resource root/env0/$Closure1_0 does not support inflight operation do.
It might not be implemented yet.
I expected this:
to run
Is there a workaround?
We can assign the inflight closure to a temp variable and then call that temp variable. This along with an explicit lift() call works around the problem:
bring cloud;
let my = new cloud.Bucket();
inflight class Foo {
pub do() {}
}
let foo = inflight (): Foo => {
return new Foo();
};
test "test" {
lift(foo,[]);
let x = foo;
x().do();
}
Anything else?
No response
Wing Version
No response
Node.js Version
No response
Platform(s)
No response
Community Notes
Please vote by adding a 👍 reaction to the issue to help us prioritize.
If you are interested to work on this issue, please leave a comment.
I tried this:
This happened:
I expected this:
to run
Is there a workaround?
We can assign the inflight closure to a temp variable and then call that temp variable. This along with an explicit
lift()
call works around the problem:Anything else?
No response
Wing Version
No response
Node.js Version
No response
Platform(s)
No response
Community Notes