Actions
Bug #19881
closedUnary operators on calls without parentheses
Description
At the moment it appears that you can't use unary operators when you have a call without parentheses. For example:
- foo 1, 2, 3
This seems useful, particularly for methods that perform calculations.
I'm also asking because I thought this was allowed, so YARP allows it. If it's not, I need to explicitly add a syntax error for it.
Updated by mame (Yusuke Endoh) 8 months ago
My uncertain understanding is that an expression (called "arg" in parse.y) must come after the unary minus. Since foo 1, 2, 3
is not an expression but a statement (called "command" in parse.y), - foo 1, 2, 3
is not acceptable.
Updated by kddnewton (Kevin Newton) 7 months ago
- Status changed from Open to Rejected
Actions
Like0
Like0Like0