You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We already plan to allow o?.[v] as a null-aware index operator access (#376).
To complete the selectors, we will also allow o?.(args) and o?.<Types>(args) as null-aware invocations.
The current workaround is to use o?.call(args) and o?.call<Types>(args), which works, but is inconsistent with that we allow o(args) and o<Types>(args) directly. The ?.call(...) workaround is already in common use.
This change modifies the grammar to allow <argumentPart> as a <cascadeSelector> (allowing o..(args) and o?..(args)) and allowing an <argumentPart> after a ?. as well, in whichever way we already modify the grammar to allow ?.[e].
An <argumentPart> is still not an assignable selector.
The text was updated successfully, but these errors were encountered:
We will not do this in the first release where nnbd is supported. We have the option to add it later. Adding the 'backlog' label to reflect that this issue is not currently active.
Probably worth noting that for index operators, we decided to go with ?[] instead of ?.[]. So if we do null-aware invocations, we probably want ?() and ?<T>().
We already plan to allow
o?.[v]
as a null-aware index operator access (#376).To complete the selectors, we will also allow
o?.(args)
ando?.<Types>(args)
as null-aware invocations.The current workaround is to use
o?.call(args)
ando?.call<Types>(args)
, which works, but is inconsistent with that we allowo(args)
ando<Types>(args)
directly. The?.call(...)
workaround is already in common use.This change modifies the grammar to allow
<argumentPart>
as a<cascadeSelector>
(allowingo..(args)
ando?..(args)
) and allowing an<argumentPart>
after a?.
as well, in whichever way we already modify the grammar to allow?.[e]
.An
<argumentPart>
is still not an assignable selector.The text was updated successfully, but these errors were encountered: