HaxeFoundation / HaxeFoundation/haxe
Null safety fails in some cases with safe navigation operator
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
**Reproduction:** https://try.haxe.org/#e7106E62
**Expected behavior:** Within the block of `if (test.first?.second?.third != null)`, `test.first.second.third` should be considered valid by the null safety checker.
**Actual behavior:** Within the block, the null check is not being properly considered.
Contributor guide
Research direction
Run the linked try.haxe.org reproduction first, then trace the compiler's null-safety handling for chained safe-navigation checks. Done means the condition in the example allows test.first.second.third inside the block without a null-safety error, while preserving the expected behavior of the reproduction.
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
- 35/100