Skip to content

Commit 1eea4ff

Browse files
authored
Merge pull request swiftlang#38013 from slavapestov/allow-bogus-same-type-in-signature-5.4
GSB: Remove a couple of well-formedness assertions [5.4]
2 parents 16c9f77 + cec3b11 commit 1eea4ff

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)