Unexpected compile error using a typed constant with copysign #1517

This commit is contained in:
Christoffer Lerno
2024-10-04 18:01:57 +02:00
parent f95769541d
commit 77ac864995
2 changed files with 2 additions and 1 deletions

View File

@@ -264,7 +264,7 @@ macro clamp(x, lower, upper) => $$max(($typeof(x))lower, $$min(x, ($typeof(x))up
/**
* @require values::@is_promotable_to_floatlike(mag) `The input must be a number value or float vector`
* @require values::@assign_to(sgn, values::promote_int(mag))
* @require $defined(($typeof(values::promote_int(mag)))mag) `It's not possible to cast the sign to the type of the magnitude`
**/
macro copysign(mag, sgn) => $$copysign(values::promote_int_same(mag, sgn), ($typeof(values::promote_int_same(mag, sgn)))sgn);