Thanks. I don't know what I was seeing, but of course it doesn't reproduce anymore ![]()
Sorry to resurrect this post, but I've been trying to reconcile the SR-12881 analysis, above, with the analysis of another protocol example here. In that other thread, we have a seemingly analogous situation:
- a protocol
P(thinkCollection), - a requirement of
Pcalledid(thinkdistance(from:to:), - a default implementation of that requirement declared in an extension of
P(thinkCollection's default implementation ofdistance(from:to:)) , - a computed property in an extension of
Pcalledid2that accessid(thinkgeneric_distance(from:to:)and its call todistance(from:to:)), - a protocol
Qthat refinesP(thinkBidirectionalCollection's refinement ofCollection), - in an extension of
Q, an implementation of theidrequirement ofP(think thedistance(from:to:)implementation provided byBidirectionalCollection)
In the example from the other thread, within the id2 code, the access of id is able to be dispatched to the implementation provided by Q. But, here, the call to distance(from:to:) is not able to be dispatched to the implementation provided by BidirectionalCollection.
If I may impose on your time, what is the difference between the SR-12881 case and the example from the other thread such that the other-thread example gets the desired dispatch behavior but distance(from:to:) does not?