solidity/test/libsolidity/syntaxTests/controlFlow/unreachableCode/if_both_return.sol

13 lines
227 B
Solidity

contract C {
function f(bool c) public pure {
if (c) {
return;
} else {
return;
}
return; // unreachable
}
}
// ----
// Warning 5740: (142-149): Unreachable code.