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

31 lines
566 B
Solidity

==== 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 ====
import "B";
contract C is B {
function foo()
public
validate()
{}
}
// ----
// TypeError 2428: (B:60-73): The type of return parameter 1, struct Data, is only supported in ABIEncoderV2. Use "pragma experimental ABIEncoderV2;" to enable the feature.