solidity/test/libsolidity/syntaxTests/array/length/cannot_be_assigned.sol
2022-04-01 23:41:18 -05:00

9 lines
229 B
Solidity

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