diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-09-30 10:41:51 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-30 10:41:51 +0100 |
| commit | 748b4cdc6b05827efb14a099340fff096c85bcc6 (patch) | |
| tree | 987b4c50995a8b89763407012f40ca515891d316 /src | |
| parent | 51a8660d521040e3c15842fa6e5a74c78b2cf7b5 (diff) | |
| parent | 0fdac0bd8cdd9186e098d0fe4f8873b588a8d00e (diff) | |
Merge pull request #5729 from harold-b/hb.fix-foreign-signatures
Relax `signature_parameter_similar_enough` on struct params and fix various foreign signatures
Diffstat (limited to 'src')
| -rw-r--r-- | src/check_decl.cpp | 6 |
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); } |