solidity/test/libsolidity/semanticTests/reverts/simple_throw.sol
2023-05-11 10:56:55 -05:00

11 lines
213 B
Solidity

contract Test {
function f(uint256 x) public returns (uint256) {
if (x > 10) return x + 10;
else revert();
return 2;
}
}
// ----
// f(uint256): 11 -> 21
// f(uint256): 1 -> FAILURE