aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/types/mapping/mapping_data_location_memory.sol
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/syntaxTests/types/mapping/mapping_data_location_memory.sol')
-rw-r--r--test/libsolidity/syntaxTests/types/mapping/mapping_data_location_memory.sol9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/types/mapping/mapping_data_location_memory.sol b/test/libsolidity/syntaxTests/types/mapping/mapping_data_location_memory.sol
new file mode 100644
index 00000000..7151e887
--- /dev/null
+++ b/test/libsolidity/syntaxTests/types/mapping/mapping_data_location_memory.sol
@@ -0,0 +1,9 @@
+contract c {
+ mapping(uint => uint) y;
+ function f() view public {
+ mapping(uint => uint) memory x = y;
+ x;
+ }
+}
+// ----
+// TypeError: (81-111): Data location for mappings must be specified as "storage".