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

9 lines
204 B
Solidity
Raw Normal View History

contract C {
mapping(uint => uint[]) map;
function f() public {
map[0].length = 4;
}
}
// ----
// TypeError: (80-93): Member "length" is read-only and cannot be used to resize arrays.