HaxeFoundation / HaxeFoundation/haxe

EitherType in function types

Open
#8,171 11 comments 0 reactions 1 assignee Claimed by @Simn View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.