Explorar o código

Merge branch 'master' into windows-llvm-11.1.0

gingerBill %!s(int64=3) %!d(string=hai) anos
pai
achega
a256b105cf
Modificáronse 2 ficheiros con 4 adicións e 1 borrados
  1. 1 1
      core/slice/slice.odin
  2. 3 0
      src/check_expr.cpp

+ 1 - 1
core/slice/slice.odin

@@ -20,7 +20,7 @@ swap :: proc(array: $T/[]$E, a, b: int) {
 }
 }
 
 
 swap_between :: proc(a, b: $T/[]$E) {
 swap_between :: proc(a, b: $T/[]$E) {
-	n := min(len(a), len(b))
+	n := builtin.min(len(a), len(b))
 	if n >= 0 {
 	if n >= 0 {
 		ptr_swap_overlapping(&a[0], &b[0], size_of(E)*n)
 		ptr_swap_overlapping(&a[0], &b[0], size_of(E)*n)
 	}	
 	}	

+ 3 - 0
src/check_expr.cpp

@@ -2453,6 +2453,9 @@ bool check_is_castable_to(CheckerContext *c, Operand *operand, Type *y) {
 		return true;
 		return true;
 	}
 	}
 
 
+	if (is_type_float(src) && is_type_complex(dst)) {
+		return true;
+	}
 	if (is_type_float(src) && is_type_quaternion(dst)) {
 	if (is_type_float(src) && is_type_quaternion(dst)) {
 		return true;
 		return true;
 	}
 	}