You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using tink_await 0.6.0, oldschool anonymous functions work as expected, but arrowfunctions don't - the return value isn't unpacked correctly. Noticed when trying Future.ofJsPromise as below, but the same seems to happen when using all Futures:
@await class Main {
@async static function main() {
// This works fine:
js.Browser.document.onmousedown = @async function(e) {
var int = @await Future.ofJsPromise(testJsPromise());
trace(int); // traces 1234
};
// This doesn't:
js.Browser.document.onmousedown = @async (e)-> {
var int = @await Future.ofJsPromise(testJsPromise());
trace(int); // traces the promise method
};
}
static function testJsPromise():Promise<Int> {
return new Promise<Int>((res, rej)->{
haxe.Timer.delay(()->res(1234), 1000);
});
}
}
The text was updated successfully, but these errors were encountered:
Using tink_await 0.6.0, oldschool anonymous functions work as expected, but arrowfunctions don't - the return value isn't unpacked correctly. Noticed when trying Future.ofJsPromise as below, but the same seems to happen when using all Futures:
The text was updated successfully, but these errors were encountered: