solidity/test/libsolidity/syntaxTests/nameAndTypeResolution/194_negative_integers_to_unsigned.sol

6 lines
146 B
Solidity

contract test {
uint8 public x = -1;
}
// ----
// TypeError: (37-39): Type int_const -1 is not implicitly convertible to expected type uint8.