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/multiVariableDeclaration/disallowWildcards.sol | |
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/multiVariableDeclaration/disallowWildcards.sol')
-rw-r--r-- | test/libsolidity/syntaxTests/multiVariableDeclaration/disallowWildcards.sol | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/multiVariableDeclaration/disallowWildcards.sol b/test/libsolidity/syntaxTests/multiVariableDeclaration/disallowWildcards.sol new file mode 100644 index 00000000..b500823d --- /dev/null +++ b/test/libsolidity/syntaxTests/multiVariableDeclaration/disallowWildcards.sol @@ -0,0 +1,24 @@ +contract C { + function fn() public pure { + (uint a,) = (1,2,3); + (,uint b) = (1,2,3); + (,uint c,) = (1,2,3,4,5); + (uint d, uint e,) = (1,2,3,4); + (,uint f, uint g) = (1,2,3,4); + (,uint h, uint i,) = (1,2,3); + (uint j,) = 1; + (,uint k) = 1; + (,uint l,) = 1; + a;b;c;d;e;f;g;h;i;j;k;l; + } +} +// ---- +// TypeError: (53-72): Different number of components on the left hand side (2) than on the right hand side (3). +// TypeError: (82-101): Different number of components on the left hand side (2) than on the right hand side (3). +// TypeError: (111-135): Different number of components on the left hand side (3) than on the right hand side (5). +// TypeError: (145-174): Different number of components on the left hand side (3) than on the right hand side (4). +// TypeError: (184-213): Different number of components on the left hand side (3) than on the right hand side (4). +// TypeError: (223-251): Different number of components on the left hand side (4) than on the right hand side (3). +// TypeError: (261-274): Different number of components on the left hand side (2) than on the right hand side (1). +// TypeError: (284-297): Different number of components on the left hand side (2) than on the right hand side (1). +// TypeError: (307-321): Different number of components on the left hand side (3) than on the right hand side (1). |