mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
30 lines
406 B
Solidity
30 lines
406 B
Solidity
|
==== Source: A ====
|
||
|
pragma experimental ABIEncoderV2;
|
||
|
|
||
|
struct Data {
|
||
|
bool flag;
|
||
|
}
|
||
|
|
||
|
contract A {
|
||
|
function get() public view returns (Data memory) {}
|
||
|
}
|
||
|
|
||
|
contract B {
|
||
|
modifier validate() virtual {
|
||
|
A(0x00).get();
|
||
|
_;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
==== Source: B ====
|
||
|
import "A";
|
||
|
|
||
|
contract C is B {
|
||
|
function foo() public pure validate {}
|
||
|
|
||
|
modifier validate() override {
|
||
|
_;
|
||
|
}
|
||
|
}
|
||
|
// ----
|