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

Null forgiving operator grammar issues #1190

Open
jskeet opened this issue Oct 21, 2024 · 1 comment
Open

Null forgiving operator grammar issues #1190

jskeet opened this issue Oct 21, 2024 · 1 comment
Assignees
Labels
meeting: discuss This issue should be discussed at the next TC49-TG2 meeting type: bug The Standard does not describe the language as intended or implemented
Milestone

Comments

@jskeet
Copy link
Contributor

jskeet commented Oct 21, 2024

The approach to specifying the null forgiving operator to prevent x!!! and the like causes some problems, and might be better dealt with as "make it valid in the grammar, but prohibit it in semantic text".

TG2: see Nigel's email about "null_forgiving_expression is either wrong or a lot of work for no gain" for more details.

@jskeet jskeet added the meeting: discuss This issue should be discussed at the next TC49-TG2 meeting label Oct 21, 2024
@jskeet jskeet added this to the C# 8.0 milestone Oct 21, 2024
@jskeet jskeet added the type: bug The Standard does not describe the language as intended or implemented label Oct 21, 2024
@jskeet
Copy link
Contributor Author

jskeet commented Oct 30, 2024

We agree with the approach. @Nigel-Ecma will create a PR, but may ask for suggestions for how we express "even if parenthesized, it's not valid" (e.g. ((x!))!).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meeting: discuss This issue should be discussed at the next TC49-TG2 meeting type: bug The Standard does not describe the language as intended or implemented
Projects
None yet
Development

No branches or pull requests

2 participants