aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/nameAndTypeResolution/217_mem_array_assignment_changes_base_type.sol
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/syntaxTests/nameAndTypeResolution/217_mem_array_assignment_changes_base_type.sol')
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/217_mem_array_assignment_changes_base_type.sol10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/217_mem_array_assignment_changes_base_type.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/217_mem_array_assignment_changes_base_type.sol
new file mode 100644
index 00000000..3755b935
--- /dev/null
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/217_mem_array_assignment_changes_base_type.sol
@@ -0,0 +1,10 @@
+contract C {
+ function f(uint8[] memory x) private {
+ // Such an assignment is possible in storage, but not in memory
+ // (because it would incur an otherwise unnecessary copy).
+ // This requirement might be lifted, though.
+ uint[] memory y = x;
+ }
+}
+// ----
+// TypeError: (256-275): Type uint8[] memory is not implicitly convertible to expected type uint256[] memory.