Adding more tests for array copying from storage to storage.

This commit is contained in:
Djordje Mijovic
2020-12-01 08:50:36 +01:00
parent 28e01202af
commit bd86588459
6 changed files with 77 additions and 0 deletions
@@ -0,0 +1,9 @@
contract C {
byte[32] data1;
bytes2[10] data2;
function f() external {
data1 = data2;
}
}
// ----
// TypeError 7407: (99-104): Type bytes2[10] storage ref is not implicitly convertible to expected type bytes1[32] storage ref.
@@ -0,0 +1,9 @@
contract C {
uint64[32] data1;
uint256[10] data2;
function f() external {
data1 = data2;
}
}
// ----
// TypeError 7407: (102-107): Type uint256[10] storage ref is not implicitly convertible to expected type uint64[32] storage ref.
@@ -0,0 +1,9 @@
contract C {
uint256[10] data1;
uint256[] data2;
function f() external {
data1 = data2;
}
}
// ----
// TypeError 7407: (101-106): Type uint256[] storage ref is not implicitly convertible to expected type uint256[10] storage ref.
@@ -0,0 +1,9 @@
contract C {
uint256[10] data1;
uint256[18] data2;
function f() external {
data1 = data2;
}
}
// ----
// TypeError 7407: (103-108): Type uint256[18] storage ref is not implicitly convertible to expected type uint256[10] storage ref.