haxe icon indicating copy to clipboard operation
haxe copied to clipboard

Hashlink 'out of memory' or hang with static abstract constructor on mutually recursive type in 5.0.0-alpha.1+de09594

Open 0b1kn00b opened this issue 6 months ago • 0 comments

Fatal error: exception Out of memory
class Main {
	static function main() {
		trace("Hello, world!");
	}
}
typedef BinaryTreeDef<T> = {
  // public final v       : Null<T>;
  public final ?l      : Null<BinaryTree<T>>;
  public final ?r      : Null<BinaryTree<T>>;
}
@:forward abstract BinaryTree<T>(BinaryTreeDef<T>) {
  public function new(self:BinaryTreeDef<T>) this = self;
  @:noUsing static public function lift<T>(self:BinaryTreeDef<T>):BinaryTree<T> return new BinaryTree(self);//remove and it compiles.
}

build.hxml

-cp src
-D analyzer-optimize
-main Main
--hl build.hl

0b1kn00b avatar May 21 '25 13:05 0b1kn00b