Section 22.4 “Using a typeclass”, page 484 has overflow examples, I put them into Scastie: Scastie - An interactive playground for Scala.
Which is correct? Could not find anything in the book’s Errata.
Possibly an error in the book?
-Byte.MinValue the overflows do not happen,
due to, I’m guessing, an implicit conversion to
Byte.MinValue.abs the overflows DO happen.
Why? Why no conversion in that case? Probably because
unary_- is overloaded