solidity/test/libsolidity/semanticTests/various/super.sol

32 lines
510 B
Solidity
Raw Normal View History

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 {
function f() public override(B, C) returns (uint256 r) {
return super.f() | 8;
}
}
2020-09-01 16:04:07 +00:00
// ====
// compileViaYul: also
// ----
// f() -> 15