[SR-15322] Inconsistent behavior of contains in StrideTo/StrideThrough #57644
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
standard library
Area: Standard library umbrella
Additional Detail from JIRA
md5: f2854433a036457a93fa1ca80d5ff30e
Issue Description:
StrideTo/StrideThrough conform to Sequence protocol and as such implement contains(_: ) and contains(where: ). When the stride is sorted in descending order, these methods return different values, although Sequence itself makes no assumptions about the order of the elements, and neither StrideTo/StrideThrough implementation documents such behavior.
Compare this to ascending stride behavior:
The text was updated successfully, but these errors were encountered: