Skip to content

Commit 8784464

Browse files
committed
SILGen: Add a couple of assertions
1 parent 6d75fac commit 8784464

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/SILGen/SILGenPoly.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4483,6 +4483,8 @@ void SILGenFunction::emitProtocolWitness(
44834483
->getCanonicalType());
44844484
}
44854485

4486+
assert(!witnessSubstTy->hasError());
4487+
44864488
if (auto genericFnType = dyn_cast<GenericFunctionType>(reqtSubstTy)) {
44874489
auto forwardingSubs = F.getForwardingSubstitutionMap();
44884490
reqtSubstTy = cast<FunctionType>(genericFnType
@@ -4493,6 +4495,8 @@ void SILGenFunction::emitProtocolWitness(
44934495
->getCanonicalType());
44944496
}
44954497

4498+
assert(!reqtSubstTy->hasError());
4499+
44964500
// Get the lowered type of the witness.
44974501
auto origWitnessFTy = getWitnessFunctionType(getTypeExpansionContext(), SGM,
44984502
witness, witnessKind);

0 commit comments

Comments
 (0)