Skip to content

Commit de0a7a0

Browse files
committed
SILCombiner: Remove another usage of ProtocolConformanceRef::getInherited()
This codepath consumed the result of getConformanceAndConcreteType(), which already maps inherited conformances to exact conformances.
1 parent 96ee115 commit de0a7a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/SILOptimizer/SILCombiner/SILCombinerApplyVisitors.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,8 @@ SILCombiner::createApplyWithConcreteType(FullApplySite AI,
710710
[&](CanType origTy, Type substTy,
711711
ProtocolType *proto) -> Optional<ProtocolConformanceRef> {
712712
if (substTy->isEqual(ConcreteType)) {
713-
return Conformance.getInherited(proto->getDecl());
713+
assert(proto->getDecl() == Conformance.getRequirement());
714+
return Conformance;
714715
}
715716
return ProtocolConformanceRef(proto->getDecl());
716717
});

0 commit comments

Comments
 (0)