solidity/test/libsolidity/syntaxTests/functionTypes/error_deprecate_value_constructor_nonpayable.sol

12 lines
270 B
Solidity
Raw Normal View History

2020-07-23 12:57:41 +00:00
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.