Skip to content

Comments

Fully qualify base types in macros#1310

Merged
Simn merged 6 commits intoHaxeFoundation:masterfrom
tobil4sk:fix/hx-namespace-macros
Feb 20, 2026
Merged

Fully qualify base types in macros#1310
Simn merged 6 commits intoHaxeFoundation:masterfrom
tobil4sk:fix/hx-namespace-macros

Conversation

@tobil4sk
Copy link
Member

The missing :: to qualify the types as global inside macros causes issues if they are expanded in a context where there is a name collision, e.g. the user has ::sub::hx:: or ::sub::String.

I've also added a regex check to ci to match against these to prevent more getting introduced.

Closes HaxeFoundation/haxe#11831

See also #899, #1181, HaxeFoundation/haxe#8543

Using \r instead of a literal carriage return character prevents editors
from trying to normalise the newlines.
:: causes issues if it comes in between the return type of a function
and the function name, so we have to dodge those cases
@Simn
Copy link
Member

Simn commented Feb 20, 2026

I've noticed this inconsistency before and wanted to bring it up. Thanks for looking into that!

@Simn Simn merged commit 1fd3680 into HaxeFoundation:master Feb 20, 2026
264 of 266 checks passed
@tobil4sk tobil4sk deleted the fix/hx-namespace-macros branch February 20, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[cpp] package called hx fails to compile when scriptable is defined

2 participants