diff options
| author | FourteenBrush <naessensarthur2@protonmail.com> | 2024-02-02 21:01:52 +0100 |
|---|---|---|
| committer | FourteenBrush <naessensarthur2@protonmail.com> | 2024-02-02 21:01:52 +0100 |
| commit | d463adfe4f7a0687087e6915cdb8b5adac65fa6d (patch) | |
| tree | 51eebf1a4bf65466cb48b11deeac697e99701bc9 /src/check_decl.cpp | |
| parent | 16bd19ed4399cfa56ee9d7d5d467b0f25cf91646 (diff) | |
| parent | cec08114fdd9812819c10c66cd10f0a9d63866b2 (diff) | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/check_decl.cpp')
| -rw-r--r-- | src/check_decl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp index ed3a109c2..3ccf1b97a 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -1143,7 +1143,7 @@ gb_internal void check_proc_decl(CheckerContext *ctx, Entity *e, DeclInfo *d) { "\tat %s", LIT(name), token_pos_to_string(pos)); } - } else if (!are_types_identical(this_type, other_type)) { + } else if (!signature_parameter_similar_enough(this_type, other_type)) { error(d->proc_lit, "Foreign entity '%.*s' previously declared elsewhere with a different type\n" "\tat %s", @@ -1284,7 +1284,7 @@ gb_internal void check_global_variable_decl(CheckerContext *ctx, Entity *&e, Ast TokenPos pos = f->token.pos; Type *this_type = base_type(e->type); Type *other_type = base_type(f->type); - if (!are_types_identical(this_type, other_type)) { + if (!signature_parameter_similar_enough(this_type, other_type)) { error(e->token, "Foreign entity '%.*s' previously declared elsewhere with a different type\n" "\tat %s", |