solidity/test/libsolidity/syntaxTests/nameAndTypeResolution/363_non_payable_constructor.sol
Mathias Baumann 093b9ced97 Make sure "value" error hint is only displayed in the right context
Before, the hint would be shown for any "value" member, even a user-specified one.
2019-02-18 16:29:57 +01:00

12 lines
264 B
Solidity

contract C {
constructor() public { }
}
contract D {
function f() public returns (uint) {
(new C).value(2)();
return 2;
}
}
// ----
// TypeError: (106-119): Constructor for contract C must be payable for member "value" to be available.