diff options
author | Jo-Philipp Wich <jo@mein.io> | 2024-11-29 14:00:09 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2024-11-29 16:45:07 +0100 |
commit | a6e06417785288f66c990e828cccbf9fb9836ba7 (patch) | |
tree | ce163bcc204c377c1f315fb15e153124d244360f /tests/custom/99_bugs | |
parent | ef1baabc2c429c715405a39aa8b7fa85060804c0 (diff) |
vm: resolve upvalues before pushing them onto the stack
Commit e5fe6b1 ("treewide: refactor vector usage code") accidentially dropped
the upvalue resolving logic from uc_vm_stack_push(), leading to unresolved
upvalues leaking into the script execution context.
Fixes: e5fe6b1 ("treewide: refactor vector usage code")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'tests/custom/99_bugs')
-rw-r--r-- | tests/custom/99_bugs/50_missing_upvalue_resolving | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/custom/99_bugs/50_missing_upvalue_resolving b/tests/custom/99_bugs/50_missing_upvalue_resolving new file mode 100644 index 0000000..5e96634 --- /dev/null +++ b/tests/custom/99_bugs/50_missing_upvalue_resolving @@ -0,0 +1,27 @@ +Commit e5fe6b1 ("treewide: refactor vector usage code") accidentially dropped +the upvalue resolving logic from uc_vm_stack_push(), leading to unresolved +upvalues leaking into the script execution context. + +-- File test.uc -- +export let obj = { foo: true, bar: false }; +-- End -- + +-- Testcase -- +import * as test from "./files/test.uc"; + +printf("%.J\n", [ + type(test.obj), + test.obj.foo +]); +-- End -- + +-- Args -- +-R +-- End -- + +-- Expect stdout -- +[ + "object", + true +] +-- End -- |