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> {
554
554
PrettyStackTraceConformance trace (" generating SIL witness table" ,
555
555
Conformance);
556
556
557
- // Check whether the conformance is valid first.
558
557
Conformance->resolveValueWitnesses ();
559
- if (Conformance->isInvalid ())
560
- return nullptr ;
561
-
562
558
auto *proto = Conformance->getProtocol ();
563
559
visitProtocolDecl (proto);
564
560
@@ -619,13 +615,12 @@ class SILGenConformance : public SILGenWitnessTable<SILGenConformance> {
619
615
return Conformance->getWitness (decl);
620
616
}
621
617
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) {}
629
624
630
625
void addMethodImplementation (SILDeclRef requirementRef,
631
626
SILDeclRef witnessRef,
You can’t perform that action at this time.
0 commit comments