Skip to content

Commit cec3b11

Browse files
committed
GSB: Remove a couple of well-formedness assertions
The underlying issue here won't be fixed in 5.4 and 5.5, so remove the asserts to avoid allowing code in no-asserts builds that is rejected in asserts builds. Any code that builds with this assert commented out might fall victim to an ABI break once the bug with same-type requirement minimization is actually fixed. "Fixes" https://bugs.swift.org/browse/SR-14776.
1 parent f370868 commit cec3b11

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

lib/AST/GenericSignature.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -237,18 +237,10 @@ CanGenericSignature::getCanonical(TypeArrayView<GenericTypeParamType> params,
237237
break;
238238

239239
case RequirementKind::SameType: {
240-
auto isCanonicalAnchor = [&](Type type) {
241-
if (auto *dmt = type->getAs<DependentMemberType>())
242-
return canSig->isCanonicalTypeInContext(dmt->getBase());
243-
return type->is<GenericTypeParamType>();
244-
};
245-
246240
auto firstType = reqt.getFirstType();
247241
auto secondType = reqt.getSecondType();
248-
assert(isCanonicalAnchor(firstType));
249242

250243
if (reqt.getSecondType()->isTypeParameter()) {
251-
assert(isCanonicalAnchor(secondType));
252244
assert(compareDependentTypes(firstType, secondType) < 0 &&
253245
"Out-of-order type parameters in same-type constraint");
254246
} else {

test/Prototypes/BigInt.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818

1919
// See rdar://problem/65251059
2020
// UNSUPPORTED: windows
21-
// rdar://problem/65015626
22-
// XFAIL: asserts
2321

2422
import StdlibUnittest
2523
#if canImport(Darwin)

0 commit comments

Comments
 (0)