2020-11-23 18:06:44 +00:00
|
|
|
pragma abicoder v2;
|
2019-05-08 13:39:17 +00:00
|
|
|
|
|
|
|
contract C {
|
|
|
|
function gggg(bool x) external pure returns (bool) {
|
|
|
|
return x;
|
|
|
|
}
|
|
|
|
function f(uint256 a) external view returns (bool) {
|
|
|
|
bool x = false;
|
|
|
|
assembly { x := a }
|
|
|
|
return this.gggg(x);
|
|
|
|
}
|
|
|
|
}
|
2020-04-17 20:24:33 +00:00
|
|
|
// ====
|
|
|
|
// compileViaYul: also
|
2019-05-08 13:39:17 +00:00
|
|
|
// ----
|
|
|
|
// f(uint256): 0 -> false
|
|
|
|
// gggg(bool): 0 -> false # test validation as well as sanity check #
|
|
|
|
// f(uint256): 1 -> true
|
|
|
|
// gggg(bool): 1 -> true
|
|
|
|
// f(uint256): 2 -> true
|
|
|
|
// gggg(bool): 2 -> FAILURE
|
|
|
|
// f(uint256): 0x1000 -> true
|
|
|
|
// gggg(bool): 0x1000 -> FAILURE
|