-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add implicit ofAny
from cast to Future
. Remove Futuristic
#87
Add implicit ofAny
from cast to Future
. Remove Futuristic
#87
Conversation
In theory, it's the right idea and the implementation is correct. In practice wild card casts are a bit of a minefield, as evidenced here: https://github.com/gene-pavlovsky/tink_core/blob/f85e6a090a94158868ff1ce110be8b2e83904a08/src/tink/core/Future.hx#L81 Will check what this does to various projects. If @kevinresol and @benmerckx can confirm that it's fine, then we can gladly merge this. |
@kevinresol maybe it's not so nice to have that extra generated code. |
@gene-pavlovsky I think it is fine. Because normal user shouldn't need to cast from FutureObject |
@kevinresol I've fixed the conflicts? Are you ok to merge this? |
83ccaf8
to
ee402f6
Compare
…ristic-into-future # Conflicts: # tests/Futures.hx
ee402f6
to
a2f04e9
Compare
I think we agreed to remove ofFutureObject? |
It's been a while, I forgot about this :) |
Tried on my project and the diff looks good. @benmerckx do you have any comments? |
@kevinresol No issues here |
Just as a note if anyone else runs into this: as it turns out, this kinda backfired for Haxe 3. All the static extensions for So for example if you have |
What do you think about this?
Adds a "wildcard" implicit cast to Future, similar to Promise's "wildcard"
ofData<T>(d:T):Promise<T>
cast.