Skip to content

Commit 08e417c

Browse files
committed
Eliminate unnecessary check for opaque types.
We don't want to treat opaque types differently here; ones that we want to treat differently have already been opened.
1 parent 69c998f commit 08e417c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/Sema/CSGen.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3733,11 +3733,9 @@ static bool generateInitPatternConstraints(
37333733
return cs.generateWrappedPropertyTypeConstraints(
37343734
wrappedVar, cs.getType(target.getAsExpr()), patternType);
37353735

3736-
if (!patternType->is<OpaqueTypeArchetypeType>()) {
3737-
// Add a conversion constraint between the types.
3738-
cs.addConstraint(ConstraintKind::Conversion, cs.getType(target.getAsExpr()),
3739-
patternType, locator, /*isFavored*/true);
3740-
}
3736+
// Add a conversion constraint between the types.
3737+
cs.addConstraint(ConstraintKind::Conversion, cs.getType(target.getAsExpr()),
3738+
patternType, locator, /*isFavored*/true);
37413739

37423740
return false;
37433741
}

0 commit comments

Comments
 (0)