Skip to content

Commit 60fa909

Browse files
xedinahoppen
authored andcommitted
[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 096f6f8 commit 60fa909

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
@@ -368,6 +368,11 @@ static void createConjunction(ConstraintSystem &cs,
368368
if (auto *closure = dyn_cast<ClosureExpr>(tapDC)) {
369369
referencedVars.push_back(cs.getType(closure)->castTo<TypeVariableType>());
370370
}
371+
372+
// Body of the interpolation is always isolated from its context, only
373+
// its individual elements are allowed access to type information
374+
// from the outside e.g. external declaration references.
375+
isIsolated = true;
371376
}
372377

373378
UnresolvedVarCollector paramCollector(cs);

0 commit comments

Comments
 (0)