HaxeFoundation / HaxeFoundation/haxe
[coro?] Some type inference weirdness
Open
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
```haxe
import haxe.coro.Coroutine;
typedef Yield = Coroutine R>;
function create(f:Coroutine -> Void>) {}
function main() {
create(f -> {
var sum = 1;
sum += f(sum); // Float should be Int
});
}
```
I don't know where that `Float` comes from, seems like the compiler defaults to it and then complains about itself.
Contributor guide
Assessment
This issue has not been assessed yet.