aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.cpp
diff options
context:
space:
mode:
authorHarold Brenes <harold@hbrenes.com>2025-09-29 19:54:53 -0400
committerHarold Brenes <harold@hbrenes.com>2025-09-29 19:58:14 -0400
commit24daa4427c75ea0f2ea0c7706b20849ac297c6fc (patch)
treea596a734aa1398e7f1c9f21c8f345dc4055cdb29 /src/check_decl.cpp
parent9b4c0ea4920ea70b3e9206979aa7fd36608c4837 (diff)
Fix various foreign signatures
Diffstat (limited to 'src/check_decl.cpp')
-rw-r--r--src/check_decl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp
index 842f8653c..f7df73953 100644
--- a/src/check_decl.cpp
+++ b/src/check_decl.cpp
@@ -851,6 +851,12 @@ gb_internal bool signature_parameter_similar_enough(Type *x, Type *y) {
}
}
+ Type *x_base = base_type(x);
+ Type *y_base = base_type(y);
+ if (x_base->kind == y_base->kind && x_base->kind == Type_Struct) {
+ return type_size_of(x_base) == type_size_of(y_base) && type_align_of(x_base) == type_align_of(y_base);
+ }
+
return are_types_identical(x, y);
}