diff options
| author | gingerBill <bill@gingerbill.org> | 2020-06-26 19:11:34 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-06-26 19:11:34 +0100 |
| commit | 6bd05ef5d7381f8b24a40f7df2d72c62d11a8f21 (patch) | |
| tree | 8c25194d2aa896c4e4dd27f5ff265957c4d265be /src | |
| parent | 251a3a690ed97be9582a4ca10000c4475bbef5fc (diff) | |
Begin migration from sys/win32 to sys/windows
Diffstat (limited to 'src')
| -rw-r--r-- | src/check_decl.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp index 560518df9..9e719756e 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -505,9 +505,13 @@ void check_const_decl(CheckerContext *ctx, Entity *e, Ast *type_expr, Ast *init, typedef bool TypeCheckSig(Type *t); bool sig_compare(TypeCheckSig *a, Type *x, Type *y) { + x = core_type(x); + y = core_type(y); return (a(x) && a(y)); } bool sig_compare(TypeCheckSig *a, TypeCheckSig *b, Type *x, Type *y) { + x = core_type(x); + y = core_type(y); if (a == b) { return sig_compare(a, x, y); } @@ -542,6 +546,13 @@ bool signature_parameter_similar_enough(Type *x, Type *y) { return true; } + if (sig_compare(is_type_proc, is_type_proc, x, y)) { + return true; + } + if (sig_compare(is_type_proc, is_type_pointer, x, y)) { + return true; + } + return are_types_identical(x, y); } |