solidity/test/libsolidity/semanticTests/reverts/revert.sol
2020-03-19 14:42:25 +01:00

22 lines
281 B
Solidity

contract C {
uint256 public a = 42;
function f() public {
a = 1;
revert();
}
function g() public {
a = 1;
assembly {
revert(0, 0)
}
}
}
// ----
// f() -> FAILURE
// a() -> 42
// g() -> FAILURE
// a() -> 42