Add proper unipmlemented errors for array copying

This commit is contained in:
Mathias Baumann
2020-05-25 10:48:42 +02:00
parent 7a6ad61583
commit d45bb2aa07
8 changed files with 73 additions and 1 deletions
@@ -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.