haxetink / tink_macro

The macro toolkit
MIT License
57 stars 17 forks source link

Fix ClassBuilder's getConstructor() when super class is extern #22

Closed kLabz closed 6 years ago

kLabz commented 6 years ago

Handle super class constructor's expr being null, which happens when the super class is an extern with a constructor definition.

In Haxe 3.4.X, this is handled by the compiler by throwing an exception when getting Context.getTypedExpr(null).

In current Haxe 4, however, this breaks the compilation with 'MacroApi.Invalid_expr'. I opened an issue there: https://github.com/HaxeFoundation/haxe/issues/7007 and added a manual throw here.