aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/arrayLength/parentheses.sol
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-04-12 02:49:21 +0800
committerGitHub <noreply@github.com>2018-04-12 02:49:21 +0800
commit418e2725b50aebc169dd80f78a0ce3eefc2e296e (patch)
tree6ca950c91d2dba0f44a24ed59b775e5588e8a537 /test/libsolidity/syntaxTests/arrayLength/parentheses.sol
parentd50d1f0ac1841a1d287a216451e93573fc07474e (diff)
parentcb548f6f530cf52d8490fb194623888126bd85d4 (diff)
downloaddexon-solidity-418e2725b50aebc169dd80f78a0ce3eefc2e296e.tar
dexon-solidity-418e2725b50aebc169dd80f78a0ce3eefc2e296e.tar.gz
dexon-solidity-418e2725b50aebc169dd80f78a0ce3eefc2e296e.tar.bz2
dexon-solidity-418e2725b50aebc169dd80f78a0ce3eefc2e296e.tar.lz
dexon-solidity-418e2725b50aebc169dd80f78a0ce3eefc2e296e.tar.xz
dexon-solidity-418e2725b50aebc169dd80f78a0ce3eefc2e296e.tar.zst
dexon-solidity-418e2725b50aebc169dd80f78a0ce3eefc2e296e.zip
Merge pull request #3862 from ethereum/fixConstantEvaluatorTuples
Fix ConstantEvaluator to correctly handle single element tuples (i.e. parenthesis).
Diffstat (limited to 'test/libsolidity/syntaxTests/arrayLength/parentheses.sol')
-rw-r--r--test/libsolidity/syntaxTests/arrayLength/parentheses.sol25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/arrayLength/parentheses.sol b/test/libsolidity/syntaxTests/arrayLength/parentheses.sol
new file mode 100644
index 00000000..40f55ad6
--- /dev/null
+++ b/test/libsolidity/syntaxTests/arrayLength/parentheses.sol
@@ -0,0 +1,25 @@
+contract C {
+ uint constant L1 = (2);
+ uint constant L2 = ((2));
+ uint constant L3 = ((((2))));
+ uint constant L4 = (2 + 1);
+ uint constant L5 = ((2 + 1));
+ uint constant L6 = (((2) + ((1))));
+ uint constant L7 = (2 + 1) / 1;
+ uint constant L8 = (2 + ((1))) / (1);
+ uint[L1] a1;
+ uint[L2] a2;
+ uint[L3] a3;
+ uint[L4] a4;
+ uint[L5] a5;
+ uint[L6] a6;
+ uint[L7] a7;
+ uint[L8] a8;
+ uint[(2)] a9;
+ uint[(2 + 1)] a10;
+ uint[(2 + 1) + 1] a11;
+ uint[((2) + 1) + 1] a12;
+ uint[(2 + 1) + ((1))] a13;
+ uint[(((2) + 1)) + (((1)))] a14;
+ uint[((((2) + 1)) + (((1))))%1] a15;
+}