Skip to content

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

Description

@0b1kn00b
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions