HaxeFoundation / HaxeFoundation/haxe

operator overloading with ambiguous enum fails

Open
#11,029 1 comment 0 reactions 0 assignees View on GitHub
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

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.