Identify and complete facet types as needed for p5168 (#6369)

Proposal #5168 defines when a facet type must be identified or complete,
and what it means for an interface and a named constraint to be
identified or complete. This updates the toolchain to match the
requirements.

This implements identification of a facet type to require completed
named constraints and to include any interfaces from named constraints
into the resulting IdentifiedFacetType.

To complete a facet type, each interface in the IdentifiedFacetType, and
any interface named though a require declaration from them, must be
complete.
This commit is contained in:
Dana Jansens
2025-11-14 19:24:02 +00:00
committed by GitHub
parent 0183fa301f
commit e62678e682
13 changed files with 326 additions and 180 deletions
+1
View File
@@ -121,6 +121,7 @@ auto ImplWitnessStartDefinition(Context& context, SemIR::Impl& impl) -> void {
witness_block.empty()) {
if (!RequireCompleteFacetTypeForImplDefinition(
context, SemIR::LocId(impl.latest_decl_id()), impl.constraint_id)) {
FillImplWitnessWithErrors(context, impl);
return;
}