solidity/test/libsolidity/syntaxTests/nameAndTypeResolution/362_calling_nonpayable.sol

7 lines
219 B
Solidity
Raw Normal View History

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.