solidity/test/libsolidity/syntaxTests/receiveEther/view_modifier.sol
2020-01-08 16:12:06 +01:00

7 lines
153 B
Solidity

contract C {
uint x;
receive() external view { x = 2; }
}
// ----
// TypeError: (29-63): Receive ether function must be "payable" but is "view".