diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2018-07-05 00:35:01 +0800 |
---|---|---|
committer | Daniel Kirchner <daniel@ekpyron.org> | 2018-07-13 02:33:52 +0800 |
commit | 62645d530253c365ac09979135e9037f2bde2934 (patch) | |
tree | 2d62564d9208f14f0e807d14fa2b5dd977acdaaa /test/libsolidity/syntaxTests/parsing | |
parent | 6f383e162648766d0cc804fe4cbb5760b48953a2 (diff) | |
download | dexon-solidity-62645d530253c365ac09979135e9037f2bde2934.tar dexon-solidity-62645d530253c365ac09979135e9037f2bde2934.tar.gz dexon-solidity-62645d530253c365ac09979135e9037f2bde2934.tar.bz2 dexon-solidity-62645d530253c365ac09979135e9037f2bde2934.tar.lz dexon-solidity-62645d530253c365ac09979135e9037f2bde2934.tar.xz dexon-solidity-62645d530253c365ac09979135e9037f2bde2934.tar.zst dexon-solidity-62645d530253c365ac09979135e9037f2bde2934.zip |
Update tests.
Diffstat (limited to 'test/libsolidity/syntaxTests/parsing')
-rw-r--r-- | test/libsolidity/syntaxTests/parsing/multi_variable_declarations.sol | 6 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/parsing/tuples.sol | 13 |
2 files changed, 6 insertions, 13 deletions
diff --git a/test/libsolidity/syntaxTests/parsing/multi_variable_declarations.sol b/test/libsolidity/syntaxTests/parsing/multi_variable_declarations.sol index 1984ed36..56c2e280 100644 --- a/test/libsolidity/syntaxTests/parsing/multi_variable_declarations.sol +++ b/test/libsolidity/syntaxTests/parsing/multi_variable_declarations.sol @@ -2,8 +2,8 @@ contract C { function f() pure public { (uint a, uint b, uint c) = g(); (uint d) = 2; - (, uint e) = 3; - (uint h,) = 4; + (, uint e) = (3,4); + (uint h,) = (4,5); (uint x,,) = g(); (, uint y,) = g(); a; b; c; d; e; h; x; y; @@ -11,5 +11,3 @@ contract C { function g() pure public returns (uint, uint, uint) {} } // ---- -// Warning: (93-107): Different number of components on the left hand side (2) than on the right hand side (1). -// Warning: (111-124): Different number of components on the left hand side (2) than on the right hand side (1). diff --git a/test/libsolidity/syntaxTests/parsing/tuples.sol b/test/libsolidity/syntaxTests/parsing/tuples.sol index ca2f9d6b..875556e9 100644 --- a/test/libsolidity/syntaxTests/parsing/tuples.sol +++ b/test/libsolidity/syntaxTests/parsing/tuples.sol @@ -1,16 +1,11 @@ contract C { - function f() public { + function f() public pure { uint a = (1); - (uint b,) = 1; + (uint b,) = (1,2); (uint c, uint d) = (1, 2 + a); - (uint e,) = (1, 2, b); + (uint e,) = (1, b); (a) = 3; + a;b;c;d;e; } } // ---- -// Warning: (54-67): Different number of components on the left hand side (2) than on the right hand side (1). -// Warning: (104-125): Different number of components on the left hand side (2) than on the right hand side (3). -// Warning: (72-78): Unused local variable. -// Warning: (80-86): Unused local variable. -// Warning: (105-111): Unused local variable. -// Warning: (14-140): Function state mutability can be restricted to pure |