This commit is contained in:
Mid 2025-10-10 17:16:06 +03:00
parent 2049826870
commit fc8d65f893

View File

@ -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;
}