From fe8325f0ad3607fae86600a396fa3a16327e127a Mon Sep 17 00:00:00 2001 From: Beau McCartney Date: Sun, 29 Sep 2024 23:34:09 -0600 Subject: fix deferred procedure errors --- src/checker.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/checker.cpp') diff --git a/src/checker.cpp b/src/checker.cpp index af1e0e675..ae2a79041 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -6206,7 +6206,7 @@ gb_internal void check_deferred_procedures(Checker *c) { } if ((src_params == nullptr && dst_params != nullptr) || (src_params != nullptr && dst_params == nullptr)) { - error(src->token, "Deferred procedure '%.*s' parameters do not match the inputs of initial procedure '%.*s'", LIT(src->token.string), LIT(dst->token.string)); + error(src->token, "Deferred procedure '%.*s' parameters do not match the inputs of initial procedure '%.*s'", LIT(dst->token.string), LIT(src->token.string)); continue; } @@ -6219,7 +6219,7 @@ gb_internal void check_deferred_procedures(Checker *c) { gbString s = type_to_string(src_params); gbString d = type_to_string(dst_params); error(src->token, "Deferred procedure '%.*s' parameters do not match the inputs of initial procedure '%.*s':\n\t(%s) =/= (%s)", - LIT(src->token.string), LIT(dst->token.string), + LIT(dst->token.string), LIT(src->token.string), s, d ); gb_string_free(d); @@ -6236,7 +6236,7 @@ gb_internal void check_deferred_procedures(Checker *c) { } if ((src_results == nullptr && dst_params != nullptr) || (src_results != nullptr && dst_params == nullptr)) { - error(src->token, "Deferred procedure '%.*s' parameters do not match the results of initial procedure '%.*s'", LIT(src->token.string), LIT(dst->token.string)); + error(src->token, "Deferred procedure '%.*s' parameters do not match the results of initial procedure '%.*s'", LIT(dst->token.string), LIT(src->token.string)); continue; } @@ -6249,7 +6249,7 @@ gb_internal void check_deferred_procedures(Checker *c) { gbString s = type_to_string(src_results); gbString d = type_to_string(dst_params); error(src->token, "Deferred procedure '%.*s' parameters do not match the results of initial procedure '%.*s':\n\t(%s) =/= (%s)", - LIT(src->token.string), LIT(dst->token.string), + LIT(dst->token.string), LIT(src->token.string), s, d ); gb_string_free(d); @@ -6302,7 +6302,7 @@ gb_internal void check_deferred_procedures(Checker *c) { gbString s = type_to_string(tsrc); gbString d = type_to_string(dst_params); error(src->token, "Deferred procedure '%.*s' parameters do not match the results of initial procedure '%.*s':\n\t(%s) =/= (%s)", - LIT(src->token.string), LIT(dst->token.string), + LIT(dst->token.string), LIT(src->token.string), s, d ); gb_string_free(d); -- cgit v1.2.3 From e3eea1b9fa7aee552cb07abdd4820dd0380dc2aa Mon Sep 17 00:00:00 2001 From: Beau McCartney Date: Sun, 29 Sep 2024 23:55:55 -0600 Subject: print proc types in same order as procs --- src/checker.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/checker.cpp') diff --git a/src/checker.cpp b/src/checker.cpp index ae2a79041..54807d43f 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -6220,7 +6220,7 @@ gb_internal void check_deferred_procedures(Checker *c) { gbString d = type_to_string(dst_params); error(src->token, "Deferred procedure '%.*s' parameters do not match the inputs of initial procedure '%.*s':\n\t(%s) =/= (%s)", LIT(dst->token.string), LIT(src->token.string), - s, d + d, s ); gb_string_free(d); gb_string_free(s); @@ -6250,7 +6250,7 @@ gb_internal void check_deferred_procedures(Checker *c) { gbString d = type_to_string(dst_params); error(src->token, "Deferred procedure '%.*s' parameters do not match the results of initial procedure '%.*s':\n\t(%s) =/= (%s)", LIT(dst->token.string), LIT(src->token.string), - s, d + d, s ); gb_string_free(d); gb_string_free(s); @@ -6303,7 +6303,7 @@ gb_internal void check_deferred_procedures(Checker *c) { gbString d = type_to_string(dst_params); error(src->token, "Deferred procedure '%.*s' parameters do not match the results of initial procedure '%.*s':\n\t(%s) =/= (%s)", LIT(dst->token.string), LIT(src->token.string), - s, d + d, s ); gb_string_free(d); gb_string_free(s); -- cgit v1.2.3