feat: execute explicitly annotated compile-time metadata locals

This commit is contained in:
2026-10-31 10:25:47 +01:00
parent ee7eeac894
commit 4fea18b834
5 changed files with 124 additions and 2 deletions
+8
View File
@@ -1406,6 +1406,7 @@ tagged_type_metadata_recompiles_owned_private_nominal_payloads test {
` value Selected :: { value = 40 }
` if (lib.read(lib.make(), value) != 42) return -4
` if (lib.score(lib.make(), 40) != 42) return -6
` if (lib.score_local(40) != 42) return -7
` snapshot Storage() :: {
` original = { values = [{ value = 19 }, { value = 21 }] },
` nested = { values = [true] },
@@ -1468,6 +1469,13 @@ tagged_type_metadata_recompiles_owned_private_nominal_payloads test {
` if (saved.payload.children[0]? != Child) return -1
` return i16(saved.payload.count) + bias
`}
`score_local proc(bias i16) i16 {
` config Config := { children = [Child, null], count = 2 }
` saved :: config
` config.children[0] = bool
` if (saved.children[0]? != Child) return -1
` return i16(saved.count) + bias
`}
,
)
defer arraylist.deinit(&imported)