Skip to content

Commit d884601

Browse files
authored
Merge pull request #13456 from eeckstein/fix-specializer
Remove a wrong assert in the specializer and enable old Collection index functions in stdlib
2 parents 113e758 + 2d5e039 commit d884601

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

lib/SILOptimizer/Utils/Generics.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,6 @@ static bool growingSubstitutions(SubstitutionList Subs1,
245245
for (unsigned idx = 0, e = Subs1.size(); idx < e; ++idx) {
246246
auto Type1 = Subs1[idx].getReplacement()->getCanonicalType();
247247
auto Type2 = Subs2[idx].getReplacement()->getCanonicalType();
248-
// Replacement types should be concrete.
249-
assert(!Type1->hasArchetype());
250-
assert(!Type2->hasArchetype());
251248
// If types are the same, the substitution type does not grow.
252249
if (TypeCmp.isEqual(Type2, Type1))
253250
continue;

stdlib/public/core/Collection.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1706,7 +1706,6 @@ extension Collection {
17061706
public func index<T: BinaryInteger>(_ i: Index, offsetBy n: T) -> Index {
17071707
return index(i, offsetBy: Int(n))
17081708
}
1709-
/* FIXME: crashes the compiler
17101709
@available(*, deprecated, message: "all index distances are now of type Int")
17111710
public func formIndex<T: BinaryInteger>(_ i: Index, offsetBy n: T) {
17121711
return formIndex(i, offsetBy: Int(n))
@@ -1715,7 +1714,6 @@ extension Collection {
17151714
public func index<T: BinaryInteger>(_ i: Index, offsetBy n: T, limitedBy limit: Index) -> Index {
17161715
return index(i, offsetBy: Int(n), limitedBy: limit)
17171716
}
1718-
*/
17191717
@available(*, deprecated, message: "all index distances are now of type Int")
17201718
public func formIndex<T: BinaryInteger>(_ i: inout Index, offsetBy n: T, limitedBy limit: Index) -> Bool {
17211719
return formIndex(&i, offsetBy: Int(n), limitedBy: limit)

0 commit comments

Comments
 (0)