| 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 9f5bb8790815fb5bc3d600e99e19747f7c0bc94c..3bed9ab989b22baad6804a8d3253d43cdd1c7209 100644
|
| --- a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
|
| +++ b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
|
| @@ -204,6 +204,11 @@ class AssistProcessor {
|
| _coverageMarker();
|
| return;
|
| }
|
| + // type source might be null, if the type is private
|
| + if (typeSource == null) {
|
| + _coverageMarker();
|
| + return;
|
| + }
|
| // add edit
|
| Token keyword = declaredIdentifier.keyword;
|
| if (keyword is KeywordToken && keyword.keyword == Keyword.VAR) {
|
| @@ -248,6 +253,11 @@ class AssistProcessor {
|
| typeSource = utils.getTypeSource(type, librariesToImport);
|
| addLibraryImports(change, unitLibraryElement, librariesToImport);
|
| }
|
| + // type source might be null, if the type is private
|
| + if (typeSource == null) {
|
| + _coverageMarker();
|
| + return;
|
| + }
|
| // add edit
|
| _addInsertEdit(name.offset, '$typeSource ');
|
| // add proposal
|
| @@ -297,6 +307,11 @@ class AssistProcessor {
|
| _coverageMarker();
|
| return;
|
| }
|
| + // type source might be null, if the type is private
|
| + if (typeSource == null) {
|
| + _coverageMarker();
|
| + return;
|
| + }
|
| // add edit
|
| Token keyword = declarationList.keyword;
|
| if (keyword is KeywordToken && keyword.keyword == Keyword.VAR) {
|
|
|