Skip to content
Discussion options

You must be logged in to vote

You're completely understanding things.

To answer your questions

Was this considered when designing the feature?

Yes. Absolutely. And the behavior you see is intentional.

Is there documentation on why it works like it does? (I did search for quite a while, unsuccessfully.)

It is implied by the grammar rules here. Effectively you get two entirely different shaped trees here. I'm on mobile, but I can try to draw them out for you later!

As things stand, the lesson I've learned so far is to be really careful and ideally avoid chaining after a null-conditional operator to avoid this possible confusion. Please do enlighten me if there's a better way. :)

A simple way to think about it is t…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@paulcscharf
Comment options

@svick
Comment options

svick Oct 17, 2020
Collaborator

@333fred
Comment options

Answer selected by paulcscharf
Comment options

You must be logged in to vote
1 reply
@paulcscharf
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants