From: Brendan Hansen Date: Fri, 15 Jan 2021 02:44:26 +0000 (-0600) Subject: added test case and small bugfix X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=47b9c8dc7cf651a75a88bbdd72f32d8bff4f9f33;p=onyx.git added test case and small bugfix --- diff --git a/bin/onyx b/bin/onyx index a9abe2a7..3458061f 100755 Binary files a/bin/onyx and b/bin/onyx differ diff --git a/onyx.exe b/onyx.exe index 2bb8a31e..e6452587 100644 Binary files a/onyx.exe and b/onyx.exe differ diff --git a/src/onyxchecker.c b/src/onyxchecker.c index 34405674..f648dc9b 100644 --- a/src/onyxchecker.c +++ b/src/onyxchecker.c @@ -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.