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
This works in --interp and -neko but failes on -hl. There's no problem if the promises have the same type parameters, or if they're typed as Futures even with different type parameters.
var a :Promise<Int> = Future.sync(2);
a.handle( ii -> trace('a ${ii.sure()}') );
var b :Promise<String> = Future.sync("two");
b.handle( ii -> trace('b ${ii.sure()}') ); // <-- line 10
the error is
TinkFuturePromise.hx:7: a 2
Uncaught exception: Can't cast String to i32
Called from tink.core._Promise.$Promise_Impl_.~ofFuture.0(tink/core/Outcome.hx:13)
Called from tink.core._Future.$Future_Impl_.~map.1(tink/core/Future.hx:97)
Called from tink.core._Lazy.LazyFunc.compute(tink/core/Lazy.hx:106)
Called from tink.core._Lazy.$Lazy_Impl_.get(tink/core/Lazy.hx:13)
Called from tink.core._Future.SyncFuture.handle(tink/core/Future.hx:432)
Called from $TinkFuturePromise.main(TinkFuturePromise.hx:10)
Called from .init(?:1)
The text was updated successfully, but these errors were encountered:
This works in
--interp
and-neko
but failes on-hl
. There's no problem if the promises have the same type parameters, or if they're typed as Futures even with different type parameters.the error is
The text was updated successfully, but these errors were encountered: