solidity/test/libsolidity/syntaxTests/array/length/cannot_be_assigned.sol

9 lines
207 B
Solidity

contract c {
uint[] storageArray;
function f() public {
storageArray.length = 3;
}
}
// ----
// TypeError 7567: (72-91): Member "length" is read-only and cannot be used to resize arrays.