HaxeFoundation / HaxeFoundation/haxe
Modification of loop var in IntIterator doesn't really work..
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
(from #8581)
```haxe
class Test {
static function main() {
for (i in 0...5) {
trace(i);
i += 2;
trace(i);
}
}
}
```
Gives:
```
Test.hx:4:,0
Test.hx:6:,2
Test.hx:4:,1
Test.hx:6:,3
Test.hx:4:,2
Test.hx:6:,4
Test.hx:4:,3
Test.hx:6:,5
Test.hx:4:,4
Test.hx:6:,6
```
😅
https://try.haxe.org/#Ab906531
Contributor guide
Research direction
Start with the Test.hx reproduction in the issue and run the linked try.haxe example to confirm the behavior. The issue does not state the intended semantics for modifying an IntIterator loop variable, so first establish the expected result and identify the relevant compiler entry point. Done requires an agreed behavior and a regression test covering it.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100