diff options
| author | Laytan Laats <laytanlaats@hotmail.com> | 2024-07-27 04:20:03 +0200 |
|---|---|---|
| committer | Laytan Laats <laytanlaats@hotmail.com> | 2024-08-14 01:44:35 +0200 |
| commit | efe68c2e24e0a38e591f146822ed93904e4193d7 (patch) | |
| tree | c2ac0ed3d08746495aa6adcd7a1c1ab052a7ee76 /src/check_decl.cpp | |
| parent | ac68a9d52c3a9edc587e1ccab747613baf6f89de (diff) | |
posix: add package
Diffstat (limited to 'src/check_decl.cpp')
| -rw-r--r-- | src/check_decl.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp index 1425aafa8..0d4b47037 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; } |