mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Adding more tests for array copying from storage to storage.
This commit is contained in:
@@ -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.
|
||||
+9
@@ -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.
|
||||
+9
@@ -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.
|
||||
Reference in New Issue
Block a user