Open romamik opened 4 years ago
extern inline new
.extern
fixes the issue.You can also add -dce full
to workaround the issue.
It's not related to cpp.
Some local var gets name this
, which should not happen.
Also, Foo
's constructor is generated liek this (dump=pretty):
public inline function new(bar:Bar) {
this.map = bar.map;
this.keys = {
var this = this.map;
cast this.keys();
};
}
Afaik blocks in value places should not reach generators.
This code generates invalid cpp code
Cpp compilation fails with errors
Generated code looks like this