Skip to content

Commit 7b24ff4

Browse files
author
Dart CI
committed
Version 2.18.0-111.0.dev
Merge commit '37eff8b8bcd124cec3534157b7c397097e112a3c' into 'dev'
2 parents f864509 + 37eff8b commit 7b24ff4

28 files changed

+743
-1074
lines changed

pkg/analysis_server/lib/src/services/completion/dart/suggestion_builder.dart

+8-1
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ class SuggestionBuilder {
974974
withNullability: _isNonNullableByDefault);
975975
_addSuggestion(
976976
suggestion,
977-
textToMatchOverride: element.displayName,
977+
textToMatchOverride: _textToMatchOverride(element),
978978
);
979979
}
980980

@@ -1502,6 +1502,13 @@ class SuggestionBuilder {
15021502
suggestion.docSummary = doc.summary;
15031503
}
15041504
}
1505+
1506+
static String _textToMatchOverride(ExecutableElement element) {
1507+
if (element.isOperator) {
1508+
return 'operator';
1509+
}
1510+
return element.displayName;
1511+
}
15051512
}
15061513

15071514
abstract class SuggestionListener {

pkg/analysis_server/lib/src/utilities/extensions/element.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ extension ElementExtension on Element {
3838
ancestor = ancestor.enclosingElement;
3939
}
4040
return ancestor is CompilationUnitElement &&
41-
ancestor.enclosingElement.hasDeprecated;
41+
ancestor.enclosingElement2.hasDeprecated;
4242
}
4343

4444
/// Return this element and all its enclosing elements.

pkg/analysis_server/test/protocol_server_test.dart

+2
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,13 @@ class EnumTest {
240240
EnumTester<engine.ElementKind, ElementKind>()
241241
.run(convertElementKind, exceptions: {
242242
// TODO(paulberry): do any of the exceptions below constitute bugs?
243+
engine.ElementKind.AUGMENTATION_IMPORT: ElementKind.UNKNOWN,
243244
engine.ElementKind.DYNAMIC: ElementKind.UNKNOWN,
244245
engine.ElementKind.ERROR: ElementKind.UNKNOWN,
245246
engine.ElementKind.EXPORT: ElementKind.UNKNOWN,
246247
engine.ElementKind.GENERIC_FUNCTION_TYPE: ElementKind.FUNCTION_TYPE_ALIAS,
247248
engine.ElementKind.IMPORT: ElementKind.UNKNOWN,
249+
engine.ElementKind.LIBRARY_AUGMENTATION: ElementKind.UNKNOWN,
248250
engine.ElementKind.NAME: ElementKind.UNKNOWN,
249251
engine.ElementKind.NEVER: ElementKind.UNKNOWN,
250252
engine.ElementKind.UNIVERSE: ElementKind.UNKNOWN

0 commit comments

Comments
 (0)