mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Unexpected compile error using a typed constant with copysign #1517
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user