2020-03-09 21:14:07 +00:00
|
|
|
contract C {
|
|
|
|
function f() public {
|
|
|
|
assert(false);
|
|
|
|
}
|
|
|
|
|
|
|
|
function g(bool val) public returns (bool) {
|
|
|
|
assert(val == true);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
function h(bool val) public returns (bool) {
|
|
|
|
require(val);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ====
|
|
|
|
// compileViaYul: also
|
2020-11-21 13:54:16 +00:00
|
|
|
// compileToEwasm: also
|
2020-03-09 21:14:07 +00:00
|
|
|
// ----
|
2020-10-13 11:28:39 +00:00
|
|
|
// f() -> FAILURE, hex"4e487b71", 0x01
|
|
|
|
// g(bool): false -> FAILURE, hex"4e487b71", 0x01
|
2020-03-09 21:14:07 +00:00
|
|
|
// g(bool): true -> true
|
|
|
|
// h(bool): false -> FAILURE
|
|
|
|
// h(bool): true -> true
|