Skip to content

Commit 418e87e

Browse files
committed
[CSApply] Adjust flags for un-initialized pattern coercion
Coercion should be aligned with `PatternBindingEntryRequest::evaluate` and that uses only one flag - `TypeResolverContext::PatternBindingDecl`.
1 parent ac485b0 commit 418e87e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/Sema/CSApply.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8831,11 +8831,9 @@ ExprWalker::rewriteTarget(SolutionApplicationTarget target) {
88318831
auto contextualPattern = target.getContextualPattern();
88328832
auto patternType = target.getTypeOfUninitializedVar();
88338833

8834-
TypeResolutionOptions options = TypeResolverContext::PatternBindingDecl;
8835-
options |= TypeResolutionFlags::OverrideType;
8836-
88378834
if (auto coercedPattern = TypeChecker::coercePatternToType(
8838-
contextualPattern, patternType, options)) {
8835+
contextualPattern, patternType,
8836+
TypeResolverContext::PatternBindingDecl)) {
88398837
auto resultTarget = target;
88408838
resultTarget.setPattern(coercedPattern);
88418839
return resultTarget;

0 commit comments

Comments
 (0)