mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix checkBaseABICompatibility() to make it actually check return parameters and not just ordinary parameters twice
This commit is contained in:
+15
@@ -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 {}
|
||||
// ----
|
||||
+16
@@ -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.
|
||||
+16
@@ -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.
|
||||
Reference in New Issue
Block a user