solidity/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_if.sol
2022-05-19 20:23:28 +02:00

18 lines
297 B
Solidity

contract C {
function f(uint256 a) public returns (uint256 b) {
assembly {
if gt(a, 1) {
b := 2
}
}
}
}
// ====
// compileToEwasm: also
// ----
// f(uint256): 0 -> 0
// f(uint256): 1 -> 0
// f(uint256): 2 -> 2
// f(uint256): 3 -> 2