Skip to content

Commit 34c9daa

Browse files
authored
Merge pull request #62076 from slavapestov/no-assert-test-hang-fix
Disable 0022-rdar21625478.swift entirely on noassert builds
2 parents a84f96e + abfe49f commit 34c9daa

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-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);

validation-test/compiler_crashers_2_fixed/0022-rdar21625478.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// rdar://80395274 tracks getting this to pass with the requirement machine.
44
// XFAIL: *
55

6+
// The test hangs in a noassert build:
7+
// REQUIRES: asserts
8+
69
import StdlibUnittest
710

811
public struct MyRange<Bound : ForwardIndex> {

0 commit comments

Comments
 (0)