@: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() {
}
}
In my own project the error happens regardless of DCE setting. I finally got it to compile by removing the “new” function from the extern and the super() calls. Not sure if it will run properly yet.