solidity/test/libsolidity/syntaxTests/viewPureChecker/callvalue_nonpayable_assembly_function_modifier.sol
2019-03-19 20:45:27 +01:00

15 lines
251 B
Solidity

contract C
{
modifier m {
uint x;
assembly {
x := callvalue()
}
_;
}
function f() m public {
}
}
// ----
// TypeError: (99-100): This modifier uses "msg.value" or "callvalue()" and thus the function has to be payable or internal.