-
Notifications
You must be signed in to change notification settings - Fork 224
Closed
Labels
nnbdNNBD related issuesNNBD related issues
Description
With NNBD, calling methods on the result of a null aware operator whatsIt?.frobIt().fiddleSticks()
will always be a static error unless fiddleSticks
is a method on Object
.
Should we then just say that the ?.
propagates? That is, that an unguarded method call on the result of a guarded method call is treated as guarded?
Arguments for:
- It's always going to be an error otherwise, so why not just do the right thing?
Arguments against:
- It's not very compositional: changing the code to
var a = whatsIt?.frobIt(); a.fiddleSticks();
will fail.
Other issues/arguments?
trietbui85, Maistho and mernen
Metadata
Metadata
Assignees
Labels
nnbdNNBD related issuesNNBD related issues