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

9 lines
204 B
Solidity

contract C {
function (uint) external returns (uint) x;
function f() public {
x.value(2)();
}
}
// ----
// TypeError: (94-101): Member "value" is only available for payable functions.