Index: pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart |
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart |
index 7687117b36d54a71dbf15007a4ea95185733ee6e..d0b063660db93e55268c624273aaa83e5c5fa164 100644 |
--- a/pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart |
+++ b/pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart |
@@ -217,6 +217,7 @@ class _LocalVisitor extends LocalDeclarationVisitor { |
int code = data.codeUnitAt(index); |
return isLetterOrDigit(code) || code == CHAR_UNDERSCORE; |
} |
+ |
if (isIdentifierChar(offset - 1)) { |
while (offset > 0 && isIdentifierChar(offset - 1)) { |
--offset; |
@@ -488,7 +489,7 @@ class _LocalVisitor extends LocalDeclarationVisitor { |
bool isDeprecated: false, |
int relevance: DART_RELEVANCE_DEFAULT}) { |
relevance = optype.returnValueSuggestionsFilter( |
- enumDeclaration.element.type, relevance); |
+ enumDeclaration.element?.type, relevance); |
if (relevance != null) { |
_addLocalSuggestion_enumConstant(constantDeclaration, enumDeclaration, |
isAbstract: isAbstract, |