solidity/test/libsolidity/syntaxTests/nameAndTypeResolution/363_non_payable_constructor.sol
2020-07-07 12:16:18 +02:00

12 lines
262 B
Solidity

contract C {
constructor() { }
}
contract D {
function f() public returns (uint) {
(new C){value: 2}();
return 2;
}
}
// ----
// TypeError 7006: (99-116): Cannot set option "value", since the constructor of contract C is not payable.