solidity/test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationThatIsExpression.sol
2022-04-01 23:41:18 -05:00

10 lines
266 B
Solidity

contract C {
struct S { function() returns (S storage)[] x; }
S s;
function f() internal pure returns (uint, uint, uint, S storage, uint, uint) {
(,,,s.x[2](),,) = f();
}
}
// ----
// TypeError 4247: (160-168='s.x[2]()'): Expression has to be an lvalue.