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

Analyzer infinite loop with recursive enum values #11429

Closed
Simn opened this issue Dec 14, 2023 · 0 comments
Closed

Analyzer infinite loop with recursive enum values #11429

Simn opened this issue Dec 14, 2023 · 0 comments
Assignees

Comments

@Simn
Copy link
Member

Simn commented Dec 14, 2023

This currently hangs the analyzer:

class Main {
	static function main() {
		blowUp([]);
	}

	public static function blowUp(arr:Array<Foo>) {
		var qp = FooRec(arr.pop());
		while (arr.length > 0) {
			qp = FooRec(qp);
		}
	}
}

enum Foo {
	FooRec(foo:Foo);
}

It would be better if it didn't do that. The cause is ConstPropagation's equals recursively checking the arguments of enum values, which seems dubious anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant