solidity/test/libsolidity/semanticTests/structs/array_of_recursive_struct.sol
2022-05-19 20:23:28 +02:00

15 lines
309 B
Solidity

contract Test {
struct RecursiveStruct {
RecursiveStruct[] vals;
}
function func() public pure {
RecursiveStruct[1] memory val = [ RecursiveStruct(new RecursiveStruct[](42)) ];
assert(val[0].vals.length == 42);
}
}
// ====
// compileToEwasm: also
// ----
// func() ->