Skip to content

Commit 7bef540

Browse files
committed
[Constraint system] “is” pattern match should open the type
1 parent 270be17 commit 7bef540

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/Sema/CSGen.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2280,6 +2280,7 @@ namespace {
22802280
// checking; if it's impossible, fail.
22812281
if (Type castType =
22822282
resolveTypeReferenceInExpression(isPattern->getCastTypeLoc())) {
2283+
castType = CS.openUnboundGenericType(castType, locator);
22832284
CS.addConstraint(
22842285
ConstraintKind::CheckedCast, subPatternType, castType, locator);
22852286
}

0 commit comments

Comments
 (0)