Skip to content

Commit 3e11d46

Browse files
committed
areEquivalent types should be informed by the sequences they represent
Previously elementsEqual only worked with two sequences of the same type. So this solution worked. Now that elementsEqual can compare differing types if the predicate is supplied we must update it
1 parent 872fd95 commit 3e11d46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/core/SequenceAlgorithms.swift.gyb

+1-1
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ ${equivalenceExplanation}
353353
public func elementsEqual<OtherSequence>(
354354
_ other: OtherSequence${"," if preds else ""}
355355
% if preds:
356-
by areEquivalent: (${GElement}, ${GElement}) throws -> Bool
356+
by areEquivalent: (${GElement}, OtherSequence.${GElement}) throws -> Bool
357357
% end
358358
) ${rethrows_}-> Bool
359359
where

0 commit comments

Comments
 (0)