solidity/test/libsolidity/syntaxTests/memberLookup/memory_structs_with_mapping_array_struct_array.sol
2020-06-30 16:53:41 +05:30

13 lines
357 B
Solidity

contract Test {
struct S1 { uint8 a; mapping(uint => uint)[] b1; uint8 c; }
struct S2 { uint8 a; S1[] b2; uint8 c; }
S2 s2;
function f() public {
S2 memory x = s2;
x.b2.length;
x.b2[1].b1[2][3];
}
}
// ----
// TypeError 4061: (161-172): Type struct Test.S2 is only valid in storage because it contains a (nested) mapping.