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
@@ -2468,6 +2468,7 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver,
resolver.local_insts().GetAs<SemIR::FacetType>(
new_canonical_facet_type_inst_id);
new_require.facet_type_id = new_canonical_facet_type.facet_type_id;
new_require.extend_self = import_require.extend_self;
new_require.parent_scope_id = parent_scope_id;
SetGenericData(resolver, import_require.generic_id, new_require.generic_id,