solidity/test/libsolidity/syntaxTests/inheritance/override/override_shared_base.sol

16 lines
328 B
Solidity
Raw Normal View History

2019-09-16 12:33:43 +00:00
contract I {
2019-11-05 17:25:34 +00:00
function set() public virtual {}
2019-09-16 12:33:43 +00:00
}
contract A is I {
uint a;
2019-11-05 17:25:34 +00:00
function set() public virtual override { a = 1; super.set(); a = 2; }
2019-09-16 12:33:43 +00:00
}
contract B is I {
uint b;
2019-11-05 17:25:34 +00:00
function set() public virtual override { b = 1; super.set(); b = 2; }
2019-09-16 12:33:43 +00:00
}
contract X is A, B {
function set() public override(A, B) { super.set(); }
}