mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add proper unipmlemented errors for array copying
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
contract Test {
|
||||
struct shouldBug {
|
||||
bytes[2] deadly;
|
||||
}
|
||||
function killer(bytes[2] calldata weapon) pure external {
|
||||
shouldBug(weapon);
|
||||
}
|
||||
}
|
||||
|
||||
// ----
|
||||
// UnimplementedFeatureError: Copying nested dynamic calldata arrays to memory is not implemented in the old code generator.
|
||||
@@ -0,0 +1,13 @@
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
contract Test {
|
||||
struct shouldBug {
|
||||
uint256[][2] deadly;
|
||||
}
|
||||
function killer(uint256[][2] calldata weapon) pure external {
|
||||
shouldBug(weapon);
|
||||
}
|
||||
}
|
||||
|
||||
// ----
|
||||
// UnimplementedFeatureError: Copying nested dynamic calldata arrays to memory is not implemented in the old code generator.
|
||||
@@ -0,0 +1,13 @@
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
contract Test {
|
||||
struct shouldBug {
|
||||
uint256[][] deadly;
|
||||
}
|
||||
function killer(uint256[][] calldata weapon) pure external {
|
||||
shouldBug(weapon);
|
||||
}
|
||||
}
|
||||
|
||||
// ----
|
||||
// UnimplementedFeatureError: Copying nested dynamic calldata arrays to memory is not implemented in the old code generator.
|
||||
@@ -0,0 +1,9 @@
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
contract C {
|
||||
uint[][2] tmp_i;
|
||||
function i(uint[][2] calldata s) external { tmp_i = s; }
|
||||
}
|
||||
|
||||
// ----
|
||||
// UnimplementedFeatureError: Copying nested calldata dynamic arrays to storage is not implemented in the old code generator.
|
||||
@@ -0,0 +1,9 @@
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
contract C {
|
||||
uint[][] tmp_i;
|
||||
function i(uint[][] calldata s) external { tmp_i = s; }
|
||||
}
|
||||
|
||||
// ----
|
||||
// UnimplementedFeatureError: Copying nested calldata dynamic arrays to storage is not implemented in the old code generator.
|
||||
Reference in New Issue
Block a user