The specification of Mininess in the Scalaness User Documentation says that the negative sign when applied to an integer literal is part of the literal. That is '-128' is a single token and not the '-' token followed by the '128' token. This is important because otherwise -128 will have type int16_t rather than int8_t as it should. In particular '128' must have type int16_t since 128 is too large to represent with int8_t. With the '-' sign as part of the literal token the compiler can see that '-128' is a legal int8_t value and assign it an appropriate type.
The specification of Mininess in the Scalaness User Documentation says that the negative sign when applied to an integer literal is part of the literal. That is '-128' is a single token and not the '-' token followed by the '128' token. This is important because otherwise -128 will have type
int16_t
rather thanint8_t
as it should. In particular '128' must have typeint16_t
since 128 is too large to represent withint8_t
. With the '-' sign as part of the literal token the compiler can see that '-128' is a legalint8_t
value and assign it an appropriate type.