Skip to content

Commit d5e9a39

Browse files
committed
[CSApply] Mark pattern target as fully verified
1 parent 73f9392 commit d5e9a39

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/Sema/CSApply.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8671,8 +8671,11 @@ ExprWalker::rewriteTarget(SolutionApplicationTarget target) {
86718671
return None;
86728672

86738673
auto *pattern = resultTarget->getInitializationPattern();
8674-
patternBinding->setPattern(index, pattern,
8675-
resultTarget->getDeclContext());
8674+
// Record that the pattern has been fully validated,
8675+
// this is important for subsequent call to typeCheckDecl
8676+
// because otherwise it would try to re-typecheck pattern.
8677+
patternBinding->setPattern(index, pattern, resultTarget->getDeclContext(),
8678+
/*isFullyValidated=*/true);
86768679

86778680
if (patternBinding->isExplicitlyInitialized(index) ||
86788681
(patternBinding->isDefaultInitializable(index) &&

0 commit comments

Comments
 (0)