added test case and small bugfix
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Fri, 15 Jan 2021 02:44:26 +0000 (20:44 -0600)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Fri, 15 Jan 2021 02:44:26 +0000 (20:44 -0600)
bin/onyx
onyx.exe
src/onyxchecker.c

index a9abe2a7e55846529288a4e5694f675ad4c90d4b..3458061f662a6d989b108a51b770380675c72e7d 100755 (executable)
Binary files a/bin/onyx and b/bin/onyx differ
index 2bb8a31ecfa509c37c64a48559fdd8fa081000e6..e64525879973b013847facbac4caf914ebb744f3 100644 (file)
Binary files a/onyx.exe and b/onyx.exe differ
index 344056745f82ef2e350ed192916715b9297010e1..f648dc9b1f8db2d7769fd2a4c78b8d89e14176ff 100644 (file)
@@ -505,6 +505,12 @@ CheckStatus check_call(AstCall* call) {
     }
 
     bh_arr(AstArgument *) arg_arr = call->arg_arr;
+    bh_arr_each(AstArgument *, arg, arg_arr) {
+        if (*arg != NULL) continue;
+
+        onyx_report_error(call->token->pos, "Not all arguments were given a value.");
+        return Check_Error;
+    }
 
     // NOTE: If we are calling an intrinsic function, translate the
     // call into an intrinsic call node.