HaxeFoundation / HaxeFoundation/haxe
Possible bug in for in expression
Open
discussion
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
Hej,
I noticed that and idk if it's a bug or what ? I think it's inconsistent since the 1st works
```haxe
class Test {
static function main() {
for( i in null ?? [] ){} // Ok
for( i in ( true ? [] : [] ) ){} // Ok
for( i in true ? [] : [] ){} // For expression should be 'v in expr'
}
}
```
Contributor guide
Research direction
No source files or tests are named. Start by running the minimal Haxe example from the issue and compare how the three for expressions are parsed; done means the inconsistent behavior is explained and the intended handling is covered by an appropriate regression test.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100