Index: pkg/analysis_server/lib/src/services/correction/assist_internal.dart |
diff --git a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart |
index 27cc2cf5c3580e0d3031e52eaa4bff1b14ce0c46..c92920d7e650d371d596d3d455f8b648c20c6b14 100644 |
--- a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart |
+++ b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart |
@@ -338,7 +338,7 @@ class AssistProcessor { |
DartType type = initializer.bestType; |
// prepare type source |
String typeSource; |
- if (type is InterfaceType || type is FunctionType) { |
+ if (type is InterfaceType && !type.isDartCoreNull || type is FunctionType) { |
_configureTargetLocation(node); |
Set<Source> librariesToImport = new Set<Source>(); |
typeSource = utils.getTypeSource(type, librariesToImport); |