dotnet / dotnet/csharpstandard
When is a unary operator not a unary operator?
- Dominant language
- C#
- Stars
- 815
- Forks
- 99
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 16
Description
#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".
Contributor guide
Assessment
This issue has not been assessed yet.