solidity/test/libsolidity/syntaxTests/nameAndTypeResolution/362_calling_nonpayable.sol
Mathias Baumann 093b9ced97 Make sure "value" error hint is only displayed in the right context
Before, the hint would be shown for any "value" member, even a user-specified one.
2019-02-18 16:29:57 +01:00

7 lines
219 B
Solidity

contract receiver { function nopay() public {} }
contract test {
function f() public { (new receiver()).nopay.value(10)(); }
}
// ----
// TypeError: (91-119): Member "value" is only available for payable functions.