Stream: bugs

Topic: ✔ Error when assigning negative number with no whitespace


view this post on Zulip Brian Teague (Nov 03 2025 at 19:46):

birds=3
main! = |args|
   Stdout.line!("There are ${Num.to_str(birds)} birds.")

Output: There are 3 birds

birds=-3
main! = |args|
   Stdout.line!("There are ${Num.to_str(birds)} birds.")

Output: I have no specific suggestion for this operator, see operator-desugaring-table

birds = -3
main! = |args|
   Stdout.line!("There are ${Num.to_str(birds)} birds.")

Output: There are -3 birds.

view this post on Zulip Brendan Hansknecht (Nov 03 2025 at 19:49):

Rust or zig compiler? I assume rust

view this post on Zulip Anton (Nov 04 2025 at 09:20):

It's indeed in the rust compiler, birds=-3 works in the zig compiler. Given that this is not a major issue we will not fix this in the old (=rust) compiler @Brian Teague.

view this post on Zulip Notification Bot (Nov 04 2025 at 09:20):

Anton has marked this topic as resolved.


Last updated: Dec 21 2025 at 12:15 UTC