| 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 ea97679577cae9f42325d362da95c296d5143088..995ec2756827c7dd8c11bf8d13dc315097fb652a 100644
|
| --- a/pkg/analysis_server/lib/src/services/completion/dart/optype.dart
|
| +++ b/pkg/analysis_server/lib/src/services/completion/dart/optype.dart
|
| @@ -772,6 +772,10 @@ class _OpTypeAstVisitor extends GeneralizingAstVisitor {
|
| if (identical(entity, node.expression)) {
|
| optype.includeReturnValueSuggestions = true;
|
| optype.includeTypeNameSuggestions = true;
|
| + } else if (node.statements.contains(entity)) {
|
| + optype.includeReturnValueSuggestions = true;
|
| + optype.includeTypeNameSuggestions = true;
|
| + optype.includeVoidReturnSuggestions = true;
|
| }
|
| }
|
|
|
| @@ -877,14 +881,6 @@ class _OpTypeAstVisitor extends GeneralizingAstVisitor {
|
| }
|
| }
|
|
|
| - bool _isEntityPrevToken(TokenType expectedType) {
|
| - Object entity = this.entity;
|
| - if (entity is SimpleIdentifier && entity.token.isSynthetic) {
|
| - return entity.token.previous.type == expectedType;
|
| - }
|
| - return false;
|
| - }
|
| -
|
| bool _isEntityPrevTokenSynthetic() {
|
| Object entity = this.entity;
|
| if (entity is AstNode && entity.beginToken.previous?.isSynthetic ?? false) {
|
|
|