From fc8d65f8931e96041a7940134b73e582ff6878d0 Mon Sep 17 00:00:00 2001 From: Mid <> Date: Fri, 10 Oct 2025 17:16:06 +0300 Subject: [PATCH] Bug fix --- src/types.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types.c b/src/types.c index 333fd32..0ec2dec 100644 --- a/src/types.c +++ b/src/types.c @@ -207,7 +207,7 @@ int type_is_castable(Type *from, Type *to) { } } - if(from->type == TYPE_TYPE_PRIMITIVE && to->type == TYPE_TYPE_POINTER) { + if(from->type == TYPE_TYPE_PRIMITIVE && to->type == TYPE_TYPE_POINTER || from->type == TYPE_TYPE_POINTER && to->type == TYPE_TYPE_PRIMITIVE) { return 2; }