solidity/test/libsolidity/syntaxTests/constantEvaluator/overflow.sol
2022-04-01 23:41:18 -05:00

10 lines
229 B
Solidity

contract C {
uint8 constant a = 255;
uint16 constant b = a + 2;
function f() public pure {
uint[b] memory x;
}
}
// ----
// TypeError 2643: (65-70='a + 2'): Arithmetic error when computing constant value.