File tree 4 files changed +12
-1
lines changed
4 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,8 @@ class PersistentParserState {
128
128
std::unique_ptr<FunctionBodyState>
129
129
takeFunctionBodyState (AbstractFunctionDecl *AFD);
130
130
131
+ bool hasFunctionBodyState (AbstractFunctionDecl *AFD);
132
+
131
133
void delayAccessorBodyParsing (AbstractFunctionDecl *AFD,
132
134
SourceRange BodyRange,
133
135
SourceLoc PreviousLoc,
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ class ParseDelayedFunctionBodies : public ASTWalker {
89
89
Parsed = true ;
90
90
}
91
91
}
92
- if (!Parsed)
92
+ if (!Parsed && ParserState. hasFunctionBodyState (AFD) )
93
93
TheParser.parseAbstractFunctionBodyDelayed (AFD);
94
94
if (CodeCompletion)
95
95
CodeCompletion->doneParsing ();
Original file line number Diff line number Diff line change @@ -41,6 +41,10 @@ PersistentParserState::takeFunctionBodyState(AbstractFunctionDecl *AFD) {
41
41
return State;
42
42
}
43
43
44
+ bool PersistentParserState::hasFunctionBodyState (AbstractFunctionDecl *AFD) {
45
+ return DelayedFunctionBodies.find (AFD) != DelayedFunctionBodies.end ();
46
+ }
47
+
44
48
void PersistentParserState::delayAccessorBodyParsing (AbstractFunctionDecl *AFD,
45
49
SourceRange BodyRange,
46
50
SourceLoc PreviousLoc,
Original file line number Diff line number Diff line change @@ -67,3 +67,8 @@ struct CustomGenericCollection<Key> : DictionaryLiteralConvertible {
67
67
var count: Int { #^GENERIC_PARAM_AND_ASSOC_TYPE ^# }
68
68
}
69
69
70
+ // rdar://problem/21796881
71
+ // RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RDAR_21796881
72
+ extension NilLiteralConvertible {
73
+ var nil : Self { #^RDAR_21796881 ^#
74
+ }
You can’t perform that action at this time.
0 commit comments