mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 07:08:48 +00:00
Fix #3122
This commit is contained in:
+3
-1
@@ -2988,6 +2988,9 @@ gb_internal bool check_is_castable_to(CheckerContext *c, Operand *operand, Type
|
|||||||
}
|
}
|
||||||
// proc <-> proc
|
// proc <-> proc
|
||||||
if (is_type_proc(src) && is_type_proc(dst)) {
|
if (is_type_proc(src) && is_type_proc(dst)) {
|
||||||
|
if (is_type_polymorphic(src) || is_type_polymorphic(dst)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3067,7 +3070,6 @@ gb_internal void check_cast(CheckerContext *c, Operand *x, Type *type) {
|
|||||||
|
|
||||||
bool is_const_expr = x->mode == Addressing_Constant;
|
bool is_const_expr = x->mode == Addressing_Constant;
|
||||||
bool can_convert = check_cast_internal(c, x, type);
|
bool can_convert = check_cast_internal(c, x, type);
|
||||||
|
|
||||||
if (!can_convert) {
|
if (!can_convert) {
|
||||||
TEMPORARY_ALLOCATOR_GUARD();
|
TEMPORARY_ALLOCATOR_GUARD();
|
||||||
gbString expr_str = expr_to_string(x->expr, temporary_allocator());
|
gbString expr_str = expr_to_string(x->expr, temporary_allocator());
|
||||||
|
|||||||
Reference in New Issue
Block a user