Closed kevinresol closed 4 years ago
4.0.5
// Main.hx class Main { static function main() Macro.run(); } typedef Obj1 = {foo:Int} typedef Obj2 = {foo:String} // Macro.hx import haxe.macro.Expr; import haxe.macro.Context; class Macro { public static macro function run() { try { var ct = TExtend([ {pack: [], name: 'Main', params: [], sub: 'Obj1'}, {pack: [], name: 'Main', params: [], sub: 'Obj2'}, ], []); Context.typeof(macro { var v:$ct = null; v; }); } catch(e:Dynamic) { trace(e); } return macro null; } }
Fails with Cannot redefine field foo with different type and the error is uncatchable
Cannot redefine field foo with different type
This was meant for Haxe. Sorry for misposting.
4.0.5
Fails with
Cannot redefine field foo with different type
and the error is uncatchable