solidity/test/libsolidity/syntaxTests/controlFlow/unreachableCode/assembly/revert.sol
2020-03-09 16:23:10 +01:00

18 lines
379 B
Solidity

contract C {
function f(uint256 y) public pure returns (uint256 x) {
assembly {
revert(0, 0)
x := y
}
}
function g(uint256 y) public pure returns (uint256 x) {
assembly {
revert(0, 0)
}
x = y;
}
}
// ----
// Warning: (129-135): Unreachable code.
// Warning: (274-279): Unreachable code.