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 propagation expression does not allow `!` as a nested operator form #3393

Open
agocke opened this issue Apr 24, 2020 · 1 comment
Open

Null propagation expression does not allow `!` as a nested operator form #3393

agocke opened this issue Apr 24, 2020 · 1 comment

Comments

@agocke
Copy link
Contributor

@agocke agocke commented Apr 24, 2020

See dotnet/docs#17988

This means that the only correct parse of

var x = a?.b.c!.d.e;

is (a?.b.c)!.d.e, which prevents usage of null-forgiving in a chain of null-propagating accesses. To remedy this we could accept ! as an optional token after every simple name in the null-propagating non-terminal.

cc @jcouv @gafter

@AntonLapounov
Copy link
Member

@AntonLapounov AntonLapounov commented Apr 24, 2020

I was not aware of this issue and filed dotnet/roslyn#43659.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.