collection_methods_unrelated_type
does not warn about null
keys.
#5004
Labels
set-core
Affects a rule in the core Dart rule set
Describe the issue
According to #3049,
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: