mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
add available suggestions for getters/setters
Fixes: https://github.com/dart-lang/sdk/issues/40626 Change-Id: I765928864c719a4c7202f9bdc768c7a6e4d8e850 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135789 Commit-Queue: Phil Quitslund <pquitslund@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
parent
35705086c5
commit
f83770e1fe
|
@ -241,6 +241,8 @@ class DartCompletionManager implements CompletionContributor {
|
|||
kinds.add(protocol.ElementKind.ENUM_CONSTANT);
|
||||
kinds.add(protocol.ElementKind.EXTENSION);
|
||||
kinds.add(protocol.ElementKind.FUNCTION);
|
||||
kinds.add(protocol.ElementKind.GETTER);
|
||||
kinds.add(protocol.ElementKind.SETTER);
|
||||
kinds.add(protocol.ElementKind.TOP_LEVEL_VARIABLE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -370,7 +370,6 @@ void main() {
|
|||
}
|
||||
|
||||
/// See: https://github.com/dart-lang/sdk/issues/40626
|
||||
@failingTest
|
||||
Future<void> test_project_lib_getters() async {
|
||||
await addProjectFile('lib/a.dart', r'''
|
||||
int get g => 0;
|
||||
|
@ -383,8 +382,8 @@ void main() {
|
|||
''');
|
||||
|
||||
expectSuggestion(
|
||||
completion: 's',
|
||||
element: ElementKind.SETTER,
|
||||
completion: 'g',
|
||||
element: ElementKind.GETTER,
|
||||
kind: CompletionSuggestionKind.INVOCATION);
|
||||
}
|
||||
|
||||
|
@ -412,7 +411,6 @@ void main() {
|
|||
}
|
||||
|
||||
/// See: https://github.com/dart-lang/sdk/issues/40626
|
||||
@failingTest
|
||||
Future<void> test_project_lib_setters() async {
|
||||
await addProjectFile('lib/a.dart', r'''
|
||||
set s(int s) {}
|
||||
|
|
|
@ -184,7 +184,9 @@ main() {
|
|||
ElementKind.EXTENSION,
|
||||
ElementKind.FUNCTION,
|
||||
ElementKind.FUNCTION_TYPE_ALIAS,
|
||||
ElementKind.GETTER,
|
||||
ElementKind.MIXIN,
|
||||
ElementKind.SETTER,
|
||||
ElementKind.TOP_LEVEL_VARIABLE,
|
||||
]),
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue