Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When is a unary operator not a unary operator? #1215

Open
jskeet opened this issue Nov 20, 2024 · 0 comments
Open

When is a unary operator not a unary operator? #1215

jskeet opened this issue Nov 20, 2024 · 0 comments
Assignees
Labels
type: bug The Standard does not describe the language as intended or implemented

Comments

@jskeet
Copy link
Contributor

jskeet commented Nov 20, 2024

#1195 claims that the null-forgiving operator is not a unary operator.

I would like that to not be so, given that it's a (postfix) operator with a single operand, which has always been my understanding of "unary operator".

This may prove to be more controversial than I'd expected.

Note that unary_expression and primary_expression are not up for being changed here - even though unary_expression doesn't include all expressions using unary operators.

This bug is for research around how feasible it is to make this consistent without being too disruptive.

Note that await already counts as a "unary operator" but can't be overloaded, so "unary operator" doesn't actually mean "overloadable operator with one operand".

@jskeet jskeet added the type: bug The Standard does not describe the language as intended or implemented label Nov 20, 2024
@jskeet jskeet self-assigned this Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug The Standard does not describe the language as intended or implemented
Projects
None yet
Development

No branches or pull requests

1 participant