File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -778,13 +778,14 @@ SILFunction *SILGenModule::emitProtocolWitness(
778778 // in a protocol extension, the generic signature will have an additional
779779 // generic parameter representing Self, so the generic parameters of the
780780 // class will all be shifted down by one.
781- auto conformance = reqtSubMap.lookupConformance (M.getASTContext ().TheSelfType ,
782- origConformance.getProtocol ())
783- .mapConformanceOutOfContext ();
784- ASSERT (conformance.isAbstract () == origConformance.isAbstract ());
785-
781+ auto conformance = origConformance;
786782 ProtocolConformance *manglingConformance = nullptr ;
787783 if (conformance.isConcrete ()) {
784+ conformance = reqtSubMap.lookupConformance (M.getASTContext ().TheSelfType ,
785+ origConformance.getProtocol ())
786+ .mapConformanceOutOfContext ();
787+ ASSERT (!conformance.isAbstract ());
788+
788789 manglingConformance = conformance.getConcrete ();
789790 if (auto *inherited = dyn_cast<InheritedProtocolConformance>(manglingConformance)) {
790791 manglingConformance = inherited->getInheritedConformance ();
Original file line number Diff line number Diff line change @@ -259,6 +259,15 @@ public protocol ResilientAssocTypes {
259259 associatedtype AssocType : P = ConformsToP
260260}
261261
262+ // rdar://155798849 - This is a pointless protocol and conformance but it shouldn't crash
263+ public protocol SillyP : SillyC {
264+ func f( )
265+ }
266+
267+ public class SillyC : SillyP {
268+ public func f( ) { }
269+ }
270+
262271// CHECK-LABEL: sil_default_witness_table P {
263272// CHECK-NEXT: }
264273
You can’t perform that action at this time.
0 commit comments