mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
12 lines
270 B
Solidity
12 lines
270 B
Solidity
contract C {
|
|
constructor() public { }
|
|
}
|
|
contract D {
|
|
function f() public returns (uint) {
|
|
(new C){value: 2}();
|
|
return 2;
|
|
}
|
|
}
|
|
// ----
|
|
// TypeError 7006: (106-123): Cannot set option "value", since the constructor of contract C is not payable.
|