File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -554,11 +554,7 @@ class SILGenConformance : public SILGenWitnessTable<SILGenConformance> {
554554 PrettyStackTraceConformance trace (" generating SIL witness table" ,
555555 Conformance);
556556
557- // Check whether the conformance is valid first.
558557 Conformance->resolveValueWitnesses ();
559- if (Conformance->isInvalid ())
560- return nullptr ;
561-
562558 auto *proto = Conformance->getProtocol ();
563559 visitProtocolDecl (proto);
564560
@@ -619,13 +615,12 @@ class SILGenConformance : public SILGenWitnessTable<SILGenConformance> {
619615 return Conformance->getWitness (decl);
620616 }
621617
622- void addPlaceholder (MissingMemberDecl *placeholder) {
623- llvm_unreachable (" generating a witness table with placeholders in it" );
624- }
625-
626- void addMissingMethod (SILDeclRef requirement) {
627- llvm_unreachable (" generating a witness table with placeholders in it" );
628- }
618+ // Treat placeholders and missing methods as no-ops. These may be encountered
619+ // during lazy typechecking when SILGen triggers witness resolution and
620+ // discovers and invalid conformance. The diagnostics emitted during witness
621+ // resolution should cause compilation to fail.
622+ void addPlaceholder (MissingMemberDecl *placeholder) {}
623+ void addMissingMethod (SILDeclRef requirement) {}
629624
630625 void addMethodImplementation (SILDeclRef requirementRef,
631626 SILDeclRef witnessRef,
You can’t perform that action at this time.
0 commit comments