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

12 lines
235 B
Solidity

contract C {
struct S {
uint[] a;
}
S s;
function f() public {
s.a.length = 4;
}
}
// ----
// TypeError 7567: (95-105='s.a.length'): Member "length" is read-only and cannot be used to resize arrays.