solidity/test/libsolidity/semanticTests/intheritance/super_overload.sol

30 lines
436 B
Solidity
Raw Normal View History

contract A {
function f(uint256 a) public returns (uint256) {
return 2 * a;
}
}
contract B {
function f(bool b) public returns (uint256) {
return 10;
}
}
contract C is A, B {
function g() public returns (uint256) {
return super.f(true);
}
function h() public returns (uint256) {
return super.f(1);
}
}
2020-09-01 16:04:07 +00:00
// ====
// compileViaYul: also
// ----
// g() -> 10
// h() -> 2