Fix the two known limits: adding map keys while looping over the map is a runtime error; temporaries held by an expression are freed when try / or-blocks leave early. err usable after or, inner err shadows outer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Nexoniarz 2026-10-09 01:26:53 +02:00
commit f9838dfe03
9 changed files with 228 additions and 17 deletions

View file

@ -0,0 +1,7 @@
// expect: a key was added to the map while looping over it
fn main() {
m := ["a": 1]
for k in m {
m[k + "!"] = 2
}
}