benmerckx / genes

Generates split ES6 modules and Typescript definitions from Haxe modules.
43 stars 8 forks source link

Test name clash with global types #49

Closed kevinresol closed 3 years ago

kevinresol commented 3 years ago

Added a failing test for #48

kevinresol commented 3 years ago

Fixed the case when importing types with reserved name. But it is still not fixed when the type is declared in current module.

benmerckx commented 3 years ago

This kinda happens with regular haxe too, if no namespaces are involved: https://try.haxe.org/#e99EE7b7 The question is which one to rename. One naive solution would be to emit @:native('GlobalType') to $global.GlobalType? https://github.com/benmerckx/genes/blob/master/src/genes/Register.hx#L8