Skip to content

Commit

Permalink
Unexpected compile error using a typed constant with copysign #1517
Browse files Browse the repository at this point in the history
  • Loading branch information
lerno committed Oct 4, 2024
1 parent f957695 commit 77ac864
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/std/math/math.c3
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
1 change: 1 addition & 0 deletions releasenotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

### Fixes
- `Unsupported int[*] $x = { 1, 2, 3, 4 }` #1489.
- Unexpected compile error using a typed constant with `copysign` #1517

### Stdlib changes
- Remove unintended print of `char[]` as String
Expand Down

0 comments on commit 77ac864

Please sign in to comment.