Skip to content

Commit ea9c637

Browse files
committed
NCGenerics: remove unreachable and explain
1 parent b8a04f6 commit ea9c637

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

lib/Sema/TypeCheckInvertible.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -468,13 +468,9 @@ ProtocolConformance *deriveConformanceForInvertible(Evaluator &evaluator,
468468
// All types already start with conformances to the invertible protocols in
469469
// this case, within `NominalTypeDecl::prepareConformanceTable`.
470470
//
471-
// I'm currently unsure what happens when rebuilding a module from its
472-
// interface, so this might not be unreachable code just yet.
473-
if (SWIFT_ENABLE_EXPERIMENTAL_NONCOPYABLE_GENERICS &&
474-
file->getKind() != FileUnitKind::Synthesized) {
475-
llvm_unreachable("when can this actually happen??");
476-
}
477-
471+
// There are various other kinds of SourceFiles, like SIL, which instead
472+
// get their conformances here instead.
473+
//
478474
// If there's no inverse, we infer a positive IP conformance.
479475
return generateConformance(nominal);
480476
}

0 commit comments

Comments
 (0)