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

11 lines
295 B
Solidity

contract C
{
function f(uint x) public {
assembly {
x := callvalue()
}
}
}
// ----
// TypeError: (81-92): "msg.value" and "callvalue()" can only be used in payable public functions. Make the function "payable" or use an internal function to avoid this error.