What kind of magic behavior is this?

Well I don't blame the extension here at all. ;) I blame the inference resolution as I don't see why it should use 'every' protocol extension instead of a sub-set of extensions that intersect with the provided type information on the implementing type. Since we haven't provided anything, it should definitely not take extensions into account that require at least one other constraint that must be met.

Maybe someone from the stdlib team knows of this behavior or can tell if even the stdlib is making use of it, but my fingers are crossed that it's not as this is 'too magical'.

cc @Ben_Cohen

2 Likes