Open srawlins opened 2 years ago
CC @leafpetersen who filed the initial lint rule request
CC @a14n who implemented the lint rule
CC @goderbauer in case this affects the decision to add this to lints/recommended.yaml as per https://github.com/dart-lang/lints/issues/64
This case also does not generate a lint report, but I expected it would.
I expected the same. Those cases were just forgotten during the implementation. I guess the following method should be extended to cover those cases. https://github.com/dart-lang/linter/blob/8c01f686b0d17233c49f8d7b86fe1b984d64086c/lib/src/rules/unnecessary_null_checks.dart#L39-L83.
I was looking at test cases in order to implement a quick fix for
null_check_on_nullable_type_parameter
but came across some test cases that surprised me.Future<T>
/await p!
:This case does not generate a lint report, but I expected it would.
List<T>
/[p!]
:This case also does not generate a lint report, but I expected it would.
Stream<T>
/yield p!
:This case also does not generate a lint report, but I expected it would.