summaryrefslogtreecommitdiff
path: root/src/ast/ast.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast/ast.c')
-rw-r--r--src/ast/ast.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ast/ast.c b/src/ast/ast.c
index 78d7efb..b20d9c2 100644
--- a/src/ast/ast.c
+++ b/src/ast/ast.c
@@ -129,6 +129,11 @@ int type_eq(Type *a, Type *b)
return 1;
}
+ if (a->kind == TYPE_UNKNOWN || b->kind == TYPE_UNKNOWN)
+ {
+ return 1;
+ }
+
// Lax integer matching (bool == int, char == i8, etc.).
if (is_integer_type(a) && is_integer_type(b))
{