| 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 190e5fd1d8aff61c61b1cc589dcbcb50cd281207..750e623da73a78dc003c48f603def2769b05de13 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
|
| @@ -394,7 +394,9 @@ class _LocalVisitor extends LocalDeclarationVisitor {
|
| ClassDeclaration classDecl,
|
| FormalParameterList param,
|
| int relevance: DART_RELEVANCE_DEFAULT}) {
|
| - if (optype.typeNameSuggestionsFilter(_staticTypeOfIdentifier(id))) {
|
| + relevance = optype.typeNameSuggestionsFilter(
|
| + _staticTypeOfIdentifier(id), relevance);
|
| + if (relevance != null) {
|
| _addLocalSuggestion(id, typeName, elemKind,
|
| isAbstract: isAbstract,
|
| isDeprecated: isDeprecated,
|
| @@ -411,15 +413,15 @@ class _LocalVisitor extends LocalDeclarationVisitor {
|
| ClassDeclaration classDecl,
|
| FormalParameterList param,
|
| int relevance: DART_RELEVANCE_DEFAULT}) {
|
| - int filterResult =
|
| - optype.returnValueSuggestionsFilter(_staticTypeOfIdentifier(id));
|
| - if (filterResult != null) {
|
| + relevance = optype.returnValueSuggestionsFilter(
|
| + _staticTypeOfIdentifier(id), relevance);
|
| + if (relevance != null) {
|
| _addLocalSuggestion(id, typeName, elemKind,
|
| isAbstract: isAbstract,
|
| isDeprecated: isDeprecated,
|
| classDecl: classDecl,
|
| param: param,
|
| - relevance: relevance + filterResult);
|
| + relevance: relevance);
|
| }
|
| }
|
|
|
|
|