File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed
lib/src/services/completion/dart
test/services/completion/dart/location Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -4153,6 +4153,7 @@ class InScopeCompletionPass extends SimpleAstVisitor<void> {
41534153 keywordHelper.addKeyword (Keyword .AWAIT );
41544154 declarationHelper (
41554155 mustBeStatic: node.inStaticContext,
4156+ mustBeNonVoid: true ,
41564157 ).addLexicalDeclarations (node);
41574158 }
41584159 }
Original file line number Diff line number Diff line change @@ -46,8 +46,8 @@ suggestions
4646
4747 Future <void > test_afterIn () async {
4848 await computeSuggestions ('''
49- void f(List<( int, int) > x01) {
50- for (final (a, b) in ^)
49+ void f(List<int> x01) {
50+ for (final a in ^)
5151}
5252''' );
5353 assertResponse (r'''
@@ -59,6 +59,23 @@ suggestions
5959''' );
6060 }
6161
62+ Future <void > test_afterIn_notVoid () async {
63+ await computeSuggestions ('''
64+ void f(List<int> x01) {
65+ for (final a in ^)
66+ }
67+
68+ void f01() {}
69+ ''' );
70+ assertResponse (r'''
71+ suggestions
72+ x01
73+ kind: parameter
74+ await
75+ kind: keyword
76+ ''' );
77+ }
78+
6279 Future <void > test_afterPattern () async {
6380 await computeSuggestions ('''
6481void f(Object x) {
You can’t perform that action at this time.
0 commit comments