HaxeFoundation / HaxeFoundation/haxe
operator overloading with ambiguous enum fails
Open
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
Order dependent – switching the enum declarations makes it work. Probably related to some other existing issue(s), but I didn't find any exact one.
```hx
function main() {
var a:A = null;
a >> Bar; // Errors: should be Int
}
abstract A({}) {
@:op(A >> B) public function op(b:Foo):Void {}
}
enum Foo {
Bar;
}
enum Baz {
Bar;
}
```
Contributor guide
Assessment
This issue has not been assessed yet.