Fix checkBaseABICompatibility() to make it actually check return parameters and not just ordinary parameters twice

This commit is contained in:
Kamil Śliwak
2020-10-12 15:14:56 +02:00
parent 9dc7f5de4a
commit e1cc888369
6 changed files with 56 additions and 1 deletions
@@ -0,0 +1,15 @@
==== Source: A ====
pragma experimental ABIEncoderV2;
struct Item {
uint x;
}
contract C {
event Ev(Item);
}
==== Source: B ====
import "A";
contract D is C {}
// ----
@@ -0,0 +1,16 @@
==== Source: A ====
pragma experimental ABIEncoderV2;
contract C {
struct Item {
uint x;
}
function get(Item memory) external view {}
}
==== Source: B ====
import "A";
contract D is C {}
// ----
// TypeError 6594: (B:13-31): Contract "D" does not use ABIEncoderV2 but wants to inherit from a contract which uses types that require it. Use "pragma experimental ABIEncoderV2;" for the inheriting contract as well to enable the feature.
@@ -0,0 +1,16 @@
==== Source: A ====
pragma experimental ABIEncoderV2;
contract C {
struct Item {
uint x;
}
function get() external view returns(Item memory) {}
}
==== Source: B ====
import "A";
contract D is C {}
// ----
// TypeError 6594: (B:13-31): Contract "D" does not use ABIEncoderV2 but wants to inherit from a contract which uses types that require it. Use "pragma experimental ABIEncoderV2;" for the inheriting contract as well to enable the feature.