Commit Graph

1 Commits

Author SHA1 Message Date
Huon Wilson
72a87a76f8 [stdlib] Work-around incorrect name resolution with conditional BidirectionalCollections.
If a type conditionally conforms to BidirectionalCollection, suffix's (and the
others) use of `index` ends up dispatching through `Collection.index` seemingly
because it is a protocol requirement. The intended function is
BidirectionalCollection's overloaded `index` (which _isn't_ connected to a
protocol requirement), which is called for non-conditional conformances. As
such, this is a work-around to stop code crashing.

Noticed in SR-8022, rdar://problem/41216424.
2018-07-19 12:22:32 +10:00