solidity/test/libsolidity/syntaxTests/abiEncoder/v2_v1_v2_modifier_sandwich.sol

33 lines
587 B
Solidity
Raw Normal View History

==== Source: A ====
pragma experimental ABIEncoderV2;
struct Data {
bool flag;
}
contract A {
function get() public view returns (Data memory) {}
}
==== Source: B ====
import "A";
contract B {
modifier validate() {
A(0x00).get();
_;
}
}
==== Source: C ====
pragma experimental ABIEncoderV2;
import "B";
contract C is B {
function foo()
public
validate()
{}
}
// ----
2020-10-29 18:40:17 +00:00
// TypeError 2428: (B:60-73): The type of return parameter 1, struct Data, is only supported in ABI coder v2. Use "pragma abicoder v2;" to enable the feature.