2020-11-23 18:06:44 +00:00
|
|
|
pragma abicoder v2;
|
2020-03-20 23:32:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
contract C {
|
|
|
|
function f(bool _b) public returns (uint256) {
|
|
|
|
if (_b) return 1;
|
|
|
|
else return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
function g(bool _in) public returns (bool _out) {
|
|
|
|
_out = _in;
|
|
|
|
}
|
|
|
|
}
|
2020-04-17 20:24:33 +00:00
|
|
|
// ====
|
|
|
|
// compileViaYul: also
|
2020-11-21 13:54:16 +00:00
|
|
|
// compileToEwasm: also
|
2020-03-20 23:32:30 +00:00
|
|
|
// ----
|
|
|
|
// f(bool): 0x0 -> 0x0
|
|
|
|
// f(bool): 0x1 -> 0x1
|
|
|
|
// f(bool): 0x2 -> FAILURE
|
|
|
|
// f(bool): 0x3 -> FAILURE
|
|
|
|
// f(bool): 0xff -> FAILURE
|
|
|
|
// g(bool): 0x0 -> 0x0
|
|
|
|
// g(bool): 0x1 -> 0x1
|
|
|
|
// g(bool): 0x2 -> FAILURE
|
|
|
|
// g(bool): 0x3 -> FAILURE
|
|
|
|
// g(bool): 0xff -> FAILURE
|