mirror of
https://github.com/Nexoniarz/Finch.git
synced 2026-11-03 00:44:27 +00:00
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:
parent
ca1d938087
commit
393327b353
9 changed files with 228 additions and 17 deletions
7
tests/fail/map_add_while_looping.fch
Normal file
7
tests/fail/map_add_while_looping.fch
Normal 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
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue