aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/nameAndTypeResolution/constant_mapping.sol
diff options
context:
space:
mode:
authormingchuan <mingc@skymizer.com>2018-07-26 12:06:56 +0800
committerchriseth <chris@ethereum.org>2018-08-15 00:53:06 +0800
commit16de7a04935ecee9c33392965f23dcfc775b799d (patch)
tree350b9722b2352f3f17bfea9489ca5a7dc0cb358a /test/libsolidity/syntaxTests/nameAndTypeResolution/constant_mapping.sol
parentb000a022f2d7c1057ade755ed1ea8c70380688a5 (diff)
downloaddexon-solidity-16de7a04935ecee9c33392965f23dcfc775b799d.tar
dexon-solidity-16de7a04935ecee9c33392965f23dcfc775b799d.tar.gz
dexon-solidity-16de7a04935ecee9c33392965f23dcfc775b799d.tar.bz2
dexon-solidity-16de7a04935ecee9c33392965f23dcfc775b799d.tar.lz
dexon-solidity-16de7a04935ecee9c33392965f23dcfc775b799d.tar.xz
dexon-solidity-16de7a04935ecee9c33392965f23dcfc775b799d.tar.zst
dexon-solidity-16de7a04935ecee9c33392965f23dcfc775b799d.zip
New test cases.
Diffstat (limited to 'test/libsolidity/syntaxTests/nameAndTypeResolution/constant_mapping.sol')
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/constant_mapping.sol8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/constant_mapping.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/constant_mapping.sol
new file mode 100644
index 00000000..61c0cc17
--- /dev/null
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/constant_mapping.sol
@@ -0,0 +1,8 @@
+contract C {
+ // This should probably have a better error message at some point.
+ // Constant mappings should not be possible in general.
+ mapping(uint => uint) constant x;
+}
+// ----
+// TypeError: (148-180): Constants of non-value type not yet implemented.
+// TypeError: (148-180): Uninitialized "constant" variable.