solidity/test/libsolidity/syntaxTests/functionTypes/error_deprecate_value_constructor.sol
2020-07-07 12:16:18 +02:00

12 lines
262 B
Solidity

contract C {
constructor() payable {}
}
contract D {
function createC() public returns (C) {
C c = (new C).value(2)();
return c;
}
}
// ----
// TypeError 1621: (115-128): Using ".value(...)" is deprecated. Use "{value: ...}" instead.