Analyzer tests use factory something() => null;
as test code.
#40603
Labels
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
NNBD
Issues related to NNBD Release
With null-safety, a factory can no longer return
null
. The implicit return type is non-nullable, so all these factory constructors become invalid code. The tests need to be fixed before the code can be migrated to null safety.Example from pkg/analysis_server/test/analysis/notification_highlights2_test.dart:
Other occurrences are in the
mock_sdk.dart
libraryThe text was updated successfully, but these errors were encountered: