From 6aef97b52844b8868e5ada38ce0936619c1077a7 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Tue, 25 Jun 2024 01:37:52 +0100 Subject: more function tests --- vm.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vm.c') diff --git a/vm.c b/vm.c index 6084f21..39bf65d 100644 --- a/vm.c +++ b/vm.c @@ -100,6 +100,9 @@ int runvm(State *S) { } Val v = ht_get(S, &S->globals, AS_STRING(varname)); PUSH(v); + if (IS_NIL(v)) { + printf("warning: nil global read %s\n", AS_CSTRING(varname)); + } break; } case OP_SETGLOBAL: { -- cgit v1.2.3