HaxeFoundation / HaxeFoundation/haxe
Constant loop unroll creates invalid position
Open
bug
platform-hl
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
When compiler does loop unroll here:
```haxe
class Main {
static function main() {
var arr = [[]];
for( i in 0...5 )
if( i <= arr.length )
arr[i].push(i);
}
}
```
It produces invalid position:
```
haxe -hl main.hl -main Main && hl main.hl
Uncaught exception: Null access
Called from $Main.main(Main.hx:4) <-- should be line 6 !
Called from fun$331(?:1)
```
Contributor guide
Assessment
This issue has not been assessed yet.