solidity/test/libsolidity/syntaxTests/controlFlow/uninitializedAccess/reverting_call_virtual4.sol
2022-04-01 23:41:18 -05:00

17 lines
1.0 KiB
Solidity

contract A {
function f() public virtual returns (uint) { g(); }
function g() internal virtual { revert(); }
}
contract B is A {
function f() public virtual override returns (uint) { A.f(); }
function g() internal virtual override { A.g(); }
}
contract C is B {
function f() public virtual override returns (uint) { A.f(); }
function g() internal virtual override { }
}
// ----
// Warning 6321: (52-56='uint'): Unnamed return variable can remain unassigned when the function is called when "C" is the most derived contract. Add an explicit return with value to all non-reverting code paths or name the variable.
// Warning 6321: (181-185='uint'): Unnamed return variable can remain unassigned when the function is called when "C" is the most derived contract. Add an explicit return with value to all non-reverting code paths or name the variable.
// Warning 6321: (318-322='uint'): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.