HaxeFoundation / HaxeFoundation/haxe
Unit shadowing
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
https://github.com/HaxeFoundation/haxe/commit/a1535c56da11b06ce6646bc6cfa99eacb5213681 caused a problem in a situation where we have a `Unit.hx` type that we want to resolve from the same package or a child package. I didn't consider that import resolution takes priority here.
I'd really like this type to always be available, but we'll have to find a way to implement this with a lower priority so that it is only checked after all other options have been exhausted. This might actually be a bit tricky for the `Unit` value itself because it currently relies on the enum being imported to make the constructor available.
Contributor guide
Research direction
Start by reviewing commit a1535c56da11b06ce6646bc6cfa99eacb5213681 and the compiler's import-resolution path for a Unit.hx type in the same or a child package. Reproduce the shadowing case, then verify that the built-in Unit remains available only after other resolution options are exhausted, including the Unit value constructor behavior.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100