In https://tutorial.ponylang.io/expressions/arithmetic.html
- | add() | wrap around on over-/underflow
+~ | add_unsafe() | Overflow E.g. I32.max_value() +~ I32(1)
But I see
var x10 = U32.max_value() + 1
env.out.print("U32.max_value() + 1: " + x10.string()) // print 0
x10 = U32.max_value() +~ U32(1)
env.out.print("U32.max_value() +~ 1: " + x10.string()) // 4294967295
That is, "+~" is performed without overflow, but "+" - with overflow
ponyc -v
0.33.2-aff95ec [release]
(windows 7 x64)