collection_methods_unrelated_type
does not warn about null
keys.
#57101
Labels
area-devexp
For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.
devexp-linter
Issues with the analyzer's support for the linter package
linter-false-negative
linter-set-core
P3
A lower priority bug or feature request
type-enhancement
A request for a change that isn't a bug
Describe the issue
According to #58427,
collection_methods_unrelated_type
should warn about usingnull
as a key to a non-nullable collection. However, the following code does not generate the lint:If this is expected, I propose another lint that will warn about indexing into collections with non-null keys with potentially null values.
To Reproduce
The following code:
Expected behavior
Warn on line 2 about
null
being used to on a map with non-null keys.The text was updated successfully, but these errors were encountered: