HaxeFoundation / HaxeFoundation/haxe
`Dynamic` type parameter casting issue
Open
feature-dynamic
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
The issue is illustrated by this example:
https://try.haxe.org/#279ae
Note: `Future.NEVER` has type of `Future`
The example uses tink_core's Futures but it doesn't have to...
A `Future` can't be cast to `Future` when assigning to a variable, but it works using a trick with a type parameter function.
I think if the "trick" works, then a simple assignment should also work.
In other words, if it's ok to assign `Dynamic` to `Int`, why not `Future` to `Future`
Contributor guide
Assessment
This issue has not been assessed yet.