Skip to content

Commit 97611a8

Browse files
committed
Sema: Fix closureEffects() to pass the right DeclContext for the lookup
1 parent 3adeecb commit 97611a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Sema/ConstraintSystem.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2229,7 +2229,7 @@ FunctionType::ExtInfo ConstraintSystem::closureEffects(ClosureExpr *expr) {
22292229
// Okay, resolve the pattern.
22302230
Pattern *pattern = LabelItem.getPattern();
22312231
if (!LabelItem.isPatternResolved()) {
2232-
pattern = TypeChecker::resolvePattern(pattern, CS.DC,
2232+
pattern = TypeChecker::resolvePattern(pattern, DC,
22332233
/*isStmtCondition*/false);
22342234
if (!pattern) return false;
22352235

@@ -2244,7 +2244,7 @@ FunctionType::ExtInfo ConstraintSystem::closureEffects(ClosureExpr *expr) {
22442244
Type castType;
22452245
if (auto castTypeRepr = isp->getCastTypeRepr()) {
22462246
castType = TypeResolution::forContextual(
2247-
CS.DC, TypeResolverContext::InExpression,
2247+
DC, TypeResolverContext::InExpression,
22482248
/*unboundTyOpener*/ nullptr)
22492249
.resolveType(castTypeRepr);
22502250
} else {

0 commit comments

Comments
 (0)