solidity/test/libsolidity/syntaxTests/functionTypes/error_deprecate_value_constructor_nonpayable.sol
2020-07-23 14:57:47 +02:00

12 lines
270 B
Solidity

contract C {
constructor() {}
}
contract D {
function createC() public returns (C) {
C c = (new C).value(2)();
return c;
}
}
// ----
// TypeError 8827: (107-120): Constructor for contract C must be payable for member "value" to be available.