aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/dataLocations
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/syntaxTests/dataLocations')
-rw-r--r--test/libsolidity/syntaxTests/dataLocations/memory_storage_data_location.sol12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/dataLocations/memory_storage_data_location.sol b/test/libsolidity/syntaxTests/dataLocations/memory_storage_data_location.sol
new file mode 100644
index 00000000..a441b540
--- /dev/null
+++ b/test/libsolidity/syntaxTests/dataLocations/memory_storage_data_location.sol
@@ -0,0 +1,12 @@
+contract C {
+ int[] x;
+ function f() public {
+ int[] storage a = x;
+ int[] memory b;
+ a = b;
+ a = int[](b);
+ }
+}
+// ----
+// TypeError: (93-94): Type int256[] memory is not implicitly convertible to expected type int256[] storage pointer.
+// TypeError: (102-110): Type int256[] memory is not implicitly convertible to expected type int256[] storage pointer.