haxe icon indicating copy to clipboard operation
haxe copied to clipboard

[hl] Compiler hang on recursive typedef

Open Simn opened this issue 6 months ago • 2 comments

@yuxiaomao Apologies, but:

function main() {
	function iterTree<T>(tree:Tree<T>) {
		return null;
	}
	iterTree(null);
}

typedef Tree<T> = {
	var left:Tree<T>;
}
Called from Hlcode.tsame.loop in file "src/generators/hlcode.ml", line 312, characters 17-28
Called from Hlcode.tsame.loop in file "src/generators/hlcode.ml", line 312, characters 17-28
Called from Hlcode.tsame.loop in file "src/generators/hlcode.ml", line 312, characters 17-28
Called from Hlcode.tsame.loop in file "src/generators/hlcode.ml", line 312, characters 17-28
Called from Hlcode.tsame.loop in file "src/generators/hlcode.ml", line 312, characters 17-28

Simn avatar Jun 05 '25 05:06 Simn