mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 16:18:52 +00:00
Be very particular with the cases for the error notes
This commit is contained in:
+4
-5
@@ -1193,8 +1193,8 @@ gb_internal void check_assignment(CheckerContext *c, Operand *operand, Type *typ
|
|||||||
Type *y = dst;
|
Type *y = dst;
|
||||||
bool same_inputs = are_types_identical_internal(x->Proc.params, y->Proc.params, false);
|
bool same_inputs = are_types_identical_internal(x->Proc.params, y->Proc.params, false);
|
||||||
bool same_outputs = are_types_identical_internal(x->Proc.results, y->Proc.results, false);
|
bool same_outputs = are_types_identical_internal(x->Proc.results, y->Proc.results, false);
|
||||||
if (same_inputs && same_outputs) {
|
if (same_inputs && same_outputs &&
|
||||||
if (x->Proc.calling_convention != y->Proc.calling_convention) {
|
x->Proc.calling_convention != y->Proc.calling_convention) {
|
||||||
gbString s_expected = type_to_string(y);
|
gbString s_expected = type_to_string(y);
|
||||||
gbString s_got = type_to_string(x);
|
gbString s_got = type_to_string(x);
|
||||||
|
|
||||||
@@ -1206,8 +1206,7 @@ gb_internal void check_assignment(CheckerContext *c, Operand *operand, Type *typ
|
|||||||
error_line("\t Got: %s\n", s_got);
|
error_line("\t Got: %s\n", s_got);
|
||||||
gb_string_free(s_got);
|
gb_string_free(s_got);
|
||||||
gb_string_free(s_expected);
|
gb_string_free(s_expected);
|
||||||
}
|
} else if (same_inputs && !same_outputs) {
|
||||||
} else if (same_inputs) {
|
|
||||||
gbString s_expected = type_to_string(y->Proc.results);
|
gbString s_expected = type_to_string(y->Proc.results);
|
||||||
gbString s_got = type_to_string(x->Proc.results);
|
gbString s_got = type_to_string(x->Proc.results);
|
||||||
error_line("\tNote: The return types differ between the procedure signature types\n");
|
error_line("\tNote: The return types differ between the procedure signature types\n");
|
||||||
@@ -1215,7 +1214,7 @@ gb_internal void check_assignment(CheckerContext *c, Operand *operand, Type *typ
|
|||||||
error_line("\t Got: %s\n", s_got);
|
error_line("\t Got: %s\n", s_got);
|
||||||
gb_string_free(s_got);
|
gb_string_free(s_got);
|
||||||
gb_string_free(s_expected);
|
gb_string_free(s_expected);
|
||||||
} else if (same_outputs) {
|
} else if (!same_inputs && same_outputs) {
|
||||||
gbString s_expected = type_to_string(y->Proc.params);
|
gbString s_expected = type_to_string(y->Proc.params);
|
||||||
gbString s_got = type_to_string(x->Proc.params);
|
gbString s_got = type_to_string(x->Proc.params);
|
||||||
error_line("\tNote: The input parameter types differ between the procedure signature types\n");
|
error_line("\tNote: The input parameter types differ between the procedure signature types\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user