Give the facet type as a TypeId to IdentifyFacetType functions (#7926)

This statically ensures that identify always works with a constant
value, in the most restrictive way possible (ensuring it's a type not
just a constant).
This commit is contained in:
Dana Jansens authored and GitHub committed 2026-10-13 15:02:58 +00:00
1 parent f396762e22
commit b1de0e037d
7 files changed
+40 -35

No files matched your search

+1 -1
View File
@@ -995,7 +995,7 @@ auto CheckConstraintIsInterface(Context& context, SemIR::LocId loc_id,
auto identified_id = RequireIdentifiedFacetType(
context, SemIR::LocId(full_constraint_id),
context.constant_values().Get(self_id),
context.constant_values().GetConstantTypeInstId(full_constraint_id),
context.types().GetTypeIdForTypeInstId(full_constraint_id),
[&](auto& builder) {
CARBON_DIAGNOSTIC(ImplOfUnidentifiedFacetType, Context,
"facet type {0} cannot be identified in `impl as`",