solidity/test/libsolidity/semanticTests/reverts/simple_throw.sol

14 lines
246 B
Solidity
Raw Normal View History

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