Allow witnesses to come from a facet with partially identified type in the lookup target (#7260)

We allow impl lookup to use `Self` which is partially identified, but we
were only allowing this for the `Self` facet appearing in the impl
lookup query self. We should also allow it when `Self` appears in the
impl lookup query target facet type.

But demonstrate that `Self` appearing in the interface of an
ImplWitnessAccess (a compound member access) is not sufficient at this
time, as it does not put `Self` into the type structure.
This commit is contained in:
Dana Jansens
2026-05-25 23:02:06 +00:00
committed by GitHub
parent 58b135235c
commit bbca8668ae
2 changed files with 41 additions and 1 deletions
+1 -1
View File
@@ -432,7 +432,7 @@ static auto CollectFacetWitnessSources(
{
SemIR::TypeIterator iter(&context.sem_ir());
iter.Add(context.insts().GetAs<SemIR::FacetType>(query_facet_type_inst_id));
collect_facets(iter, /*allow_partially_identified=*/false);
collect_facets(iter, /*allow_partially_identified=*/true);
}
if (!context.where_stack().empty()) {