mirror of
https://github.com/godotengine/godot.git
synced 2026-04-14 21:59:58 +00:00
Erasing array elements while iterating does not appear to be safe.
For example, the following prints nothing:
```
var a := [0,1,2,3,4,5,6]
for i in a:
if i % 2 == 0:
a.erase(i)
else:
print(i)
```
While this is often true for array implementations, it still seems worth
documenting explicitly. I copied the wording from Dictionary.xml.
35 KiB
35 KiB