COMMUNITY

[js-es6]Must call `super()` constructor before accessing `this` in classes derived from an extern class with constructor

[js]Must call super() constructor before accessing this in classes derived from an extern class with constructor

-D js-es=6

I found this issue already close, but I still got this error in haxe 4.1.5.

@:native("cc.Component") extern class Component {
	function new();
}

class Main extends Component {

	public function new() {
		super();
		trace('ok');
	}

}

I can’t reproduce the error neither with 4.1.5 nor with the development version of Haxe.

@:native("cc.Component") extern class Component {

    function new();

}

class Main extends Component {

    public var dd:Array<Int>=[];

    public function new() {

        super();

        trace('ok');

    }

    public static function main() {

        

    }

}

@RealyUniqueName after add

 public var dd:Array<Int>=[];