From cec3b1127654952c95b88f788c12b70ef2b860b9 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 21 Jun 2021 17:09:36 -0400 Subject: [PATCH] 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. --- lib/AST/GenericSignature.cpp | 8 -------- test/Prototypes/BigInt.swift | 2 -- 2 files changed, 10 deletions(-) diff --git a/lib/AST/GenericSignature.cpp b/lib/AST/GenericSignature.cpp index 1f9731635b49f..613a05b005191 100644 --- a/lib/AST/GenericSignature.cpp +++ b/lib/AST/GenericSignature.cpp @@ -237,18 +237,10 @@ CanGenericSignature::getCanonical(TypeArrayView params, break; case RequirementKind::SameType: { - auto isCanonicalAnchor = [&](Type type) { - if (auto *dmt = type->getAs()) - return canSig->isCanonicalTypeInContext(dmt->getBase()); - return type->is(); - }; - auto firstType = reqt.getFirstType(); auto secondType = reqt.getSecondType(); - assert(isCanonicalAnchor(firstType)); if (reqt.getSecondType()->isTypeParameter()) { - assert(isCanonicalAnchor(secondType)); assert(compareDependentTypes(firstType, secondType) < 0 && "Out-of-order type parameters in same-type constraint"); } else { diff --git a/test/Prototypes/BigInt.swift b/test/Prototypes/BigInt.swift index 2399f9fbef5fd..4beb112ec7e84 100644 --- a/test/Prototypes/BigInt.swift +++ b/test/Prototypes/BigInt.swift @@ -18,8 +18,6 @@ // See rdar://problem/65251059 // UNSUPPORTED: windows -// rdar://problem/65015626 -// XFAIL: asserts import StdlibUnittest #if canImport(Darwin)