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

16 lines
248 B
Solidity

contract C {
function getOne() public payable nonFree returns (uint256 r) {
return 1;
}
modifier nonFree {
if (msg.value > 0) _;
}
}
// ====
// compileToEwasm: also
// ----
// getOne() -> 0
// getOne(), 1 wei -> 1