solidity/test/libsolidity/semanticTests/modifiers/function_modifier_local_variables.sol

22 lines
343 B
Solidity
Raw Normal View History

contract C {
modifier mod1 {
uint8 a = 1;
uint8 b = 2;
_;
}
modifier mod2(bool a) {
if (a) return;
else _;
}
function f(bool a) public mod1 mod2(a) returns (uint256 r) {
return 3;
}
}
2020-12-03 15:08:38 +00:00
// ====
2021-04-23 15:59:01 +00:00
// compileToEwasm: also
// ----
// f(bool): true -> 0
// f(bool): false -> 3