| Index: pkg/analysis_server/lib/src/services/completion/optype.dart
|
| diff --git a/pkg/analysis_server/lib/src/services/completion/optype.dart b/pkg/analysis_server/lib/src/services/completion/optype.dart
|
| index 83e89f55e9d3e38d1ca301a882a385de6767c671..cba56957243a1931b1da0629605c3b439c36503d 100644
|
| --- a/pkg/analysis_server/lib/src/services/completion/optype.dart
|
| +++ b/pkg/analysis_server/lib/src/services/completion/optype.dart
|
| @@ -184,7 +184,9 @@ class _OpTypeAstVisitor extends GeneralizingAstVisitor {
|
| }
|
|
|
| void visitCompilationUnit(CompilationUnit node) {
|
| - optype.includeTypeNameSuggestions = true;
|
| + if (entity is! CommentToken) {
|
| + optype.includeTypeNameSuggestions = true;
|
| + }
|
| }
|
|
|
| @override
|
| @@ -310,6 +312,14 @@ class _OpTypeAstVisitor extends GeneralizingAstVisitor {
|
| }
|
|
|
| @override
|
| + void visitFunctionDeclaration(FunctionDeclaration node) {
|
| + if (identical(entity, node.returnType) ||
|
| + identical(entity, node.name) && node.returnType == null) {
|
| + optype.includeTypeNameSuggestions = true;
|
| + }
|
| + }
|
| +
|
| + @override
|
| void visitFunctionTypeAlias(FunctionTypeAlias node) {
|
| if (identical(entity, node.returnType) ||
|
| identical(entity, node.name) && node.returnType == null) {
|
|
|