summaryrefslogtreecommitdiff
path: root/com.c
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-08-17 12:53:10 +0100
committerubq323 <ubq323@ubq323.website>2024-08-17 12:53:10 +0100
commit9b75f546b3a171a4e5afc7ed9d4969f73113c2c9 (patch)
treece9adb55b89696f9f586143b107c1d30ed70c7c8 /com.c
parent05cfb9bf2461785ec621b490747f48b96344017f (diff)
skip glob for tests
Diffstat (limited to 'com.c')
-rw-r--r--com.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/com.c b/com.c
index 432ebb4..ca18c36 100644
--- a/com.c
+++ b/com.c
@@ -655,6 +655,8 @@ static void cpl_expr(Compiler *C, Val v, int flags) {
// so (returned values) = (stack change) - (new locals) = 1
CHECK( (stack_cur_b - stack_cur_a) - (nlocals_b - nlocals_a) == 1,
"stack corruption (compiler bug)");
+ CHECK( (flags & F_toplevel) || (nlocals_b == nlocals_a),
+ "local declared not at top level (compiler bug)");
}