swift
858cf2b3 - Reparenting: adjust name lookup for associated types

Commit
96 days ago
Reparenting: adjust name lookup for associated types We don't consider an associated type of a @reparentable protocol to be an overridden decl of any protocols inheriting from it. If we did, then it'd affect how getReducedType and other bits of comparison between associated types work, because they prefer anchors, i.e., associated types not overriding anything else (see `swift::compareAssociatedTypes`). That worked fine until availability checking brought to light that name lookup also relies getOverriddenDecls() to determine which associated type decl one would be the one we refer to in a protocol. So in this case it's not the reduced type, but rather the actual `DeclRefTypeRepr` that name-lookup finds for `Element`, that actually _does_ need to view that one coming from the @reparentable one as being "overridden", or shadowed I guess, by any other protocols downstream of it. rdar://170819864
Author
Committer
Parents
Loading