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

9 lines
208 B
Solidity
Raw Normal View History

contract C {
function (uint) external returns (uint) x;
function g() public {
x{value: 2}(1);
}
}
// ----
// TypeError: (94-105): Cannot set option "value" on a non-payable function type.