Poor diagnostic message when using ?.[]
#42762
Labels
analyzer-recovery
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
contributions-welcome
Contributions welcome to help resolve this (the resolution is expected to be clear from the issue)
P3
A lower priority bug or feature request
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
Create a file containing the following (invalid) code:
The use of
?.
before an index operator appears to no longer be supported, but the diagnostic message is very confusing. There is only one message generated (on the reference tos
inside the body):The message should explain to users that they can't use
?.
before[]
to null-checks
.The text was updated successfully, but these errors were encountered: