aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-11-30 02:44:33 +0800
committerchriseth <chris@ethereum.org>2018-11-30 02:45:06 +0800
commitc445e7dfa4505ba5d914f2d4b29b18107b7e6e97 (patch)
treecb31e5cbef59fd230403e7a53ed7c5740a610efe /test/libsolidity/syntaxTests
parent124a8def845186ba55ee8566b05cc617554dbcbc (diff)
downloaddexon-solidity-c445e7dfa4505ba5d914f2d4b29b18107b7e6e97.tar.gz
dexon-solidity-c445e7dfa4505ba5d914f2d4b29b18107b7e6e97.tar.zst
dexon-solidity-c445e7dfa4505ba5d914f2d4b29b18107b7e6e97.zip
Disallow inline arrays of mapping type.
Diffstat (limited to 'test/libsolidity/syntaxTests')
-rw-r--r--test/libsolidity/syntaxTests/inline_arrays/inline_array_of_mapping_type.sol8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/inline_arrays/inline_array_of_mapping_type.sol b/test/libsolidity/syntaxTests/inline_arrays/inline_array_of_mapping_type.sol
new file mode 100644
index 00000000..59a88130
--- /dev/null
+++ b/test/libsolidity/syntaxTests/inline_arrays/inline_array_of_mapping_type.sol
@@ -0,0 +1,8 @@
+contract C {
+ mapping(int => int) a;
+ function f() public {
+ [a];
+ }
+}
+// ----
+// TypeError: (66-69): Type mapping(int256 => int256) is only valid in storage.