aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2024-08-14 15:10:31 +0100
committerGitHub <noreply@github.com>2024-08-14 15:10:31 +0100
commite810c3eacec9cae74a369c747bbc5bd2a386d20d (patch)
treef6ddfebe971d21ae6dc3ecf4c86c862c1c3ee96c /src/check_decl.cpp
parent18b6af185881b7ad413157af5c21bf9d77712632 (diff)
parente29f0a0f40019d9a235e617759a24032a9688f85 (diff)
Merge pull request #4012 from laytan/posix
core:sys/posix and core:os/os2 based on it (for darwin, netbsd, freebsd and openbsd)
Diffstat (limited to 'src/check_decl.cpp')
-rw-r--r--src/check_decl.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp
index 27c1554e6..090b7f615 100644
--- a/src/check_decl.cpp
+++ b/src/check_decl.cpp
@@ -756,13 +756,29 @@ gb_internal bool are_signatures_similar_enough(Type *a_, Type *b_) {
for (isize i = 0; i < a->param_count; i++) {
Type *x = core_type(a->params->Tuple.variables[i]->type);
Type *y = core_type(b->params->Tuple.variables[i]->type);
+
+ if (x->kind == Type_BitSet && x->BitSet.underlying) {
+ x = core_type(x->BitSet.underlying);
+ }
+ if (y->kind == Type_BitSet && y->BitSet.underlying) {
+ y = core_type(y->BitSet.underlying);
+ }
+
if (!signature_parameter_similar_enough(x, y)) {
return false;
}
}
for (isize i = 0; i < a->result_count; i++) {
- Type *x = base_type(a->results->Tuple.variables[i]->type);
- Type *y = base_type(b->results->Tuple.variables[i]->type);
+ Type *x = core_type(a->results->Tuple.variables[i]->type);
+ Type *y = core_type(b->results->Tuple.variables[i]->type);
+
+ if (x->kind == Type_BitSet && x->BitSet.underlying) {
+ x = core_type(x->BitSet.underlying);
+ }
+ if (y->kind == Type_BitSet && y->BitSet.underlying) {
+ y = core_type(y->BitSet.underlying);
+ }
+
if (!signature_parameter_similar_enough(x, y)) {
return false;
}