diff options
| author | gingerBill <bill@gingerbill.org> | 2021-08-22 12:31:03 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-08-22 12:31:03 +0100 |
| commit | 8694a0f68a2b5c18ea19e1b8a526aacfd51fc85b (patch) | |
| tree | 2ec57938565527ef28f4ce0620a9128a78a06764 /src/check_decl.cpp | |
| parent | 36a6805b7cdb8b5e4014b03756f969ce6548ff73 (diff) | |
Update `signature_parameter_similar_enough` for multi pointers
Diffstat (limited to 'src/check_decl.cpp')
| -rw-r--r-- | src/check_decl.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp index 4cce25097..ec200354e 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -517,6 +517,12 @@ bool signature_parameter_similar_enough(Type *x, Type *y) { if (sig_compare(is_type_pointer, x, y)) { return true; } + if (sig_compare(is_type_multi_pointer, x, y)) { + return true; + } + if (sig_compare(is_type_proc, x, y)) { + return true; + } if (sig_compare(is_type_integer, x, y)) { GB_ASSERT(core_type(x)->kind == Type_Basic); @@ -536,15 +542,21 @@ bool signature_parameter_similar_enough(Type *x, Type *y) { if (sig_compare(is_type_cstring, is_type_u8_ptr, x, y)) { return true; } + if (sig_compare(is_type_cstring, is_type_u8_multi_ptr, x, y)) { + return true; + } if (sig_compare(is_type_uintptr, is_type_rawptr, x, y)) { return true; } - if (sig_compare(is_type_proc, is_type_proc, x, y)) { + if (sig_compare(is_type_proc, is_type_pointer, x, y)) { return true; } - if (sig_compare(is_type_proc, is_type_pointer, x, y)) { + if (sig_compare(is_type_pointer, is_type_multi_pointer, x, y)) { + return true; + } + if (sig_compare(is_type_proc, is_type_multi_pointer, x, y)) { return true; } |