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

12 lines
262 B
Solidity
Raw Normal View History

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