Skip to content

Commit

Permalink
Look in libraries associated with the interface (#4510)
Browse files Browse the repository at this point in the history
This was broken by #4499 .

---------

Co-authored-by: Josh L <[email protected]>
  • Loading branch information
josh11b and josh11b authored Nov 12, 2024
1 parent ada9564 commit 3824c5f
Show file tree
Hide file tree
Showing 2 changed files with 1,061 additions and 126 deletions.
8 changes: 8 additions & 0 deletions toolchain/check/impl_lookup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ static auto FindAssociatedImportIRs(Context& context,
add_entity(context.interfaces().Get(SemIR::InterfaceId(arg)));
break;
}
case SemIR::IdKind::For<SemIR::FacetTypeId>: {
const auto& facet_type_info =
context.sem_ir().facet_types().Get(SemIR::FacetTypeId(arg));
for (const auto& impl : facet_type_info.impls_constraints) {
add_entity(context.interfaces().Get(impl.interface_id));
}
break;
}
case SemIR::IdKind::For<SemIR::FunctionId>: {
add_entity(context.functions().Get(SemIR::FunctionId(arg)));
break;
Expand Down
Loading

0 comments on commit 3824c5f

Please sign in to comment.