HaxeFoundation / HaxeFoundation/haxe
EitherType in function types
Open
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
```haxe
class Test {
static function test(f:haxe.extern.EitherType->Void) {
f(123);
f("abc");
}
static function main() {
test(function(v:Int) {
trace(Std.is(v, Int)); //should be always true, but actually print true then false
});
}
}
```
I think the `test()` call shouldn't type-check. i.e. `Int->Void` shouldn't unifies with `haxe.extern.EitherType->Void`.
Contributor guide
Assessment
This issue has not been assessed yet.