2020-03-09 21:14:07 +00:00
|
|
|
contract A {
|
|
|
|
function f() public virtual returns (uint256 r) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
contract B is A {
|
|
|
|
function f() public virtual override returns (uint256 r) {
|
|
|
|
return super.f() | 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
contract C is A {
|
|
|
|
function f() public virtual override returns (uint256 r) {
|
|
|
|
return super.f() | 4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
contract D is B, C {
|
|
|
|
uint256 data;
|
|
|
|
|
2020-06-23 12:14:24 +00:00
|
|
|
constructor() {
|
2020-03-09 21:14:07 +00:00
|
|
|
data = super.f() | 8;
|
|
|
|
}
|
|
|
|
|
|
|
|
function f() public override (B, C) returns (uint256 r) {
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
}
|
2020-09-01 16:04:07 +00:00
|
|
|
// ====
|
|
|
|
// compileViaYul: also
|
2020-03-09 21:14:07 +00:00
|
|
|
// ----
|
|
|
|
// f() -> 15
|