mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-15 18:32:22 -07:00
Begin migration from sys/win32 to sys/windows
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user