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!:
Future<T> m40<T extends Object?>(T? p) async => await p!; // LINT
This case does not generate a lint report, but I expected it would.
List<T> / [p!]:
void ff<T>(T? p) {
<T>[p!]; // LINT
}
This case also does not generate a lint report, but I expected it would.
Stream<T> / yield p!:
Stream<T> m41<T extends Object?>(T? p) async* { yield p!; }
This case also does not generate a lint report, but I expected it would.
I was looking at test cases in order to implement a quick fix for
null_check_on_nullable_type_parameterbut 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.