Skip to content

Commit 96eeb57

Browse files
committed
[CSSyntacticElement] Make sure that body of tap is solved in isolation
It doesn't need access to anything besides external declarations which could be brought into the scope by context analyzer.
1 parent 6d0df41 commit 96eeb57

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/Sema/CSSyntacticElement.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,11 @@ static void createConjunction(ConstraintSystem &cs,
320320
if (auto *closure = dyn_cast<ClosureExpr>(tapDC)) {
321321
referencedVars.push_back(cs.getType(closure)->castTo<TypeVariableType>());
322322
}
323+
324+
// Body of the interpolation is always isolated from its context, only
325+
// its individual elements are allowed access to type information
326+
// from the outside e.g. external declaration references.
327+
isIsolated = true;
323328
}
324329

325330
UnresolvedClosureParameterCollector paramCollector(cs);

0 commit comments

Comments
 (0)