diff options
Add tests for multi variable declaration statement.
Diffstat (limited to 'test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationThatIsExpression.sol')
-rw-r--r-- | test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationThatIsExpression.sol | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationThatIsExpression.sol b/test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationThatIsExpression.sol new file mode 100644 index 00000000..8ae0eaac --- /dev/null +++ b/test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationThatIsExpression.sol @@ -0,0 +1,9 @@ +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: (160-168): Expression has to be an lvalue. |