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

10 lines
342 B
Solidity

contract C {
function f() public {
bytes32 b;
b[-1];
}
}
// ----
// TypeError 7407: (58-60='-1'): Type int_const -1 is not implicitly convertible to expected type uint256. Cannot implicitly convert signed literal to unsigned type.
// TypeError 6318: (56-61='b[-1]'): Index expression cannot be represented as an unsigned integer.