solidity/test/libsolidity/syntaxTests/controlFlow/unreachableCode/assembly/revert.sol
2022-04-01 23:41:18 -05:00

18 lines
406 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 5740: (129-135='x := y'): Unreachable code.
// Warning 5740: (274-279='x = y'): Unreachable code.