Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(415)

Unified Diff: pkg/analysis_server/lib/src/services/completion/dart/optype.dart

Issue 2624283003: Revert "Add support for generic function type syntax, part 1" (TBR) (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/lib/src/services/completion/dart/optype.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/optype.dart b/pkg/analysis_server/lib/src/services/completion/dart/optype.dart
index c9954d5caea2741268c9f065248b9c4eb096fc1d..da0e6a03ef924391f368ac76c93b13d8bb24bead 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/optype.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/optype.dart
@@ -126,6 +126,15 @@ class OpType {
OpType._();
/**
+ * Indicate whether only type names should be suggested
+ */
+ bool get includeOnlyNamedArgumentSuggestions =>
+ includeNamedArgumentSuggestions &&
+ !includeTypeNameSuggestions &&
+ !includeReturnValueSuggestions &&
+ !includeVoidReturnSuggestions;
+
+ /**
* Return `true` if free standing identifiers should be suggested
*/
bool get includeIdentifiers {
@@ -139,15 +148,6 @@ class OpType {
/**
* Indicate whether only type names should be suggested
*/
- bool get includeOnlyNamedArgumentSuggestions =>
- includeNamedArgumentSuggestions &&
- !includeTypeNameSuggestions &&
- !includeReturnValueSuggestions &&
- !includeVoidReturnSuggestions;
-
- /**
- * Indicate whether only type names should be suggested
- */
bool get includeOnlyTypeNameSuggestions =>
includeTypeNameSuggestions &&
!includeNamedArgumentSuggestions &&
@@ -845,9 +845,9 @@ class _OpTypeAstVisitor extends GeneralizingAstVisitor {
@override
void visitTypeArgumentList(TypeArgumentList node) {
- NodeList<TypeAnnotation> arguments = node.arguments;
- for (TypeAnnotation type in arguments) {
- if (identical(entity, type)) {
+ NodeList<TypeName> arguments = node.arguments;
+ for (TypeName typeName in arguments) {
+ if (identical(entity, typeName)) {
optype.includeTypeNameSuggestions = true;
break;
}

Powered by Google App Engine
This is Rietveld 408576698