aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationThatIsExpression.sol
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-04-27 21:44:41 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-05-16 09:52:24 +0800
commitc781baf7336af55abc33e1b63e6fc99a7e555d78 (patch)
tree1bab29687eaa45b50e6f241a9bac9de8a8018fe7 /test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationThatIsExpression.sol
parent67d208d144a179e52e1aab3fbd1bd67fe20176b7 (diff)
downloaddexon-solidity-c781baf7336af55abc33e1b63e6fc99a7e555d78.tar
dexon-solidity-c781baf7336af55abc33e1b63e6fc99a7e555d78.tar.gz
dexon-solidity-c781baf7336af55abc33e1b63e6fc99a7e555d78.tar.bz2
dexon-solidity-c781baf7336af55abc33e1b63e6fc99a7e555d78.tar.lz
dexon-solidity-c781baf7336af55abc33e1b63e6fc99a7e555d78.tar.xz
dexon-solidity-c781baf7336af55abc33e1b63e6fc99a7e555d78.tar.zst
dexon-solidity-c781baf7336af55abc33e1b63e6fc99a7e555d78.zip
Add tests for multi variable declaration statement.
Diffstat (limited to 'test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationThatIsExpression.sol')
-rw-r--r--test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationThatIsExpression.sol9
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.