mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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.
1.0 KiB
1.0 KiB