solidity/test/libsolidity/syntaxTests/functionTypes/call_value_on_non_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

8 lines
264 B
Solidity

contract C {
// Tests that we don't get a wrong error about constructors
function f() public view returns (C) { return this; }
function g() public { this.f.value(); }
}
// ----
// TypeError: (155-167): Member "value" is only available for payable functions.