Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

operator overloading with ambiguous enum fails #11029

Open
Antriel opened this issue Mar 22, 2023 · 1 comment
Open

operator overloading with ambiguous enum fails #11029

Antriel opened this issue Mar 22, 2023 · 1 comment
Milestone

Comments

@Antriel
Copy link
Contributor

Antriel commented Mar 22, 2023

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.

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;
}
@Simn
Copy link
Member

Simn commented Mar 22, 2023

Looks similar to #10981

@Simn Simn added this to the Later milestone Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants