solidity/test/libsolidity/syntaxTests/indexing/fixedbytes_negative_index.sol

10 lines
270 B
Solidity
Raw Normal View History

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