mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-17 01:18:47 +00:00
Add the required facet type as an extended scope of the containing interface/named constraint, and teach name lookup to look for extended scopes in named constraints. This makes name lookup work properly when the facet type does not have a specific that involves `Self`. Support for `Self` needs further work in another PR. Note that when an _interface_ requires another interface, this PR lets us find the name, but we still fail to find a witness for the interface named through `extend require`, and this is future work. For a named constraint, things work correctly as the identified facet type chases through the named constraint and includes the required interface, so impl lookup is able to provide a witness.