diff --git a/core/slice/slice.odin b/core/slice/slice.odin index 1dd777ccc..487dd46c2 100644 --- a/core/slice/slice.odin +++ b/core/slice/slice.odin @@ -20,7 +20,7 @@ swap :: proc(array: $T/[]$E, a, b: int) { } swap_between :: proc(a, b: $T/[]$E) { - n := min(len(a), len(b)) + n := builtin.min(len(a), len(b)) if n >= 0 { ptr_swap_overlapping(&a[0], &b[0], size_of(E)*n) } diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 96ca2d308..3c884d117 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -2453,6 +2453,9 @@ bool check_is_castable_to(CheckerContext *c, Operand *operand, Type *y) { return true; } + if (is_type_float(src) && is_type_complex(dst)) { + return true; + } if (is_type_float(src) && is_type_quaternion(dst)) { return true; }