aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/dataLocations
diff options
context:
space:
mode:
authorliangdzou <liang.d.zou@gmail.com>2018-09-12 18:01:34 +0800
committerDaniel Kirchner <daniel@ekpyron.org>2018-09-14 14:42:40 +0800
commitf3cbdadec7a38626e5dd64c0faa981161b99bd80 (patch)
tree85320ca1805bfaad95c45b60160481d4fcb09e6c /test/libsolidity/syntaxTests/dataLocations
parent5f4a2d2cad56dee3f7f350d65d24b98d1f4b2b07 (diff)
downloaddexon-solidity-f3cbdadec7a38626e5dd64c0faa981161b99bd80.tar.gz
dexon-solidity-f3cbdadec7a38626e5dd64c0faa981161b99bd80.tar.zst
dexon-solidity-f3cbdadec7a38626e5dd64c0faa981161b99bd80.zip
Do not set to ref for explicit conversion and add assertion for array
type conversion. Also, add some test cases for #4901 and #4948.
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.