mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
8 lines
255 B
Solidity
8 lines
255 B
Solidity
contract C {
|
|
function f() view public {
|
|
msg.value;
|
|
}
|
|
}
|
|
// ----
|
|
// TypeError: (52-61): "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.
|