stopped haxe complaining about deprecated @:extern stuff#79
stopped haxe complaining about deprecated @:extern stuff#79ninjamuffin99 wants to merge 1 commit intosaharan:masterfrom
Conversation
| field.meta.push({ | ||
| name: ":extern", | ||
| pos: U.pos() | ||
| }); | ||
| Context.getLocalClass().get().isExtern = true; | ||
|
|
There was a problem hiding this comment.
I think this will change the behavior... 🤔
The removed lines add extern metadata to variables that should finally be wiped, like foo:IVec3 which will be decomposed into fooX, fooY, and fooZ.
On the other hand I think Context.getLocalClass().get() returns the current class that is to be built, so setting it extern may wipe the entire class, but is not working somehow if it isn't causing compiler errors?
Haxe is complaining about the metadata because the metadata @:extern has been promoted into an attribute extern, so adding the attribute properly may be the right way. I need to look into it.
There was a problem hiding this comment.
You think right, to add :extern to a variable it should be field.access.push(AExtern).
But the code still compiles if the vars are not externs, perhaps that's why it also works in an extern class.
|
Isn't a simpler fix changing line 16 to |
I believe this fixes it complaining about using the @:extern metadata! I've checked it against the previous outputs and it looks like it's the same!