aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.cpp
diff options
context:
space:
mode:
authorColin Davidson <colrdavidson@gmail.com>2024-02-26 12:17:53 -0500
committerColin Davidson <colrdavidson@gmail.com>2024-02-26 12:17:53 -0500
commitdeb89221812fd5306a778daf9f48f34c6d13073a (patch)
treeee75d606d1b07aa2b8986ffbbf7f92aa1980f62d /src/check_decl.cpp
parentf93f2dfd5cf56383e33f3eb7d2773c4646b37e2f (diff)
parentcba8cb2201cfb321dd627fb1c67a5a61267465ea (diff)
Merge branch 'master' into basic_egl
Diffstat (limited to 'src/check_decl.cpp')
-rw-r--r--src/check_decl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp
index ed3a109c2..2c0f7a7b8 100644
--- a/src/check_decl.cpp
+++ b/src/check_decl.cpp
@@ -210,6 +210,7 @@ gb_internal bool is_type_distinct(Ast *node) {
case Ast_UnionType:
case Ast_EnumType:
case Ast_ProcType:
+ case Ast_BitFieldType:
return true;
case Ast_PointerType:
@@ -1143,7 +1144,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 +1285,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",