mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-17 20:30:27 +00:00
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:
1 parent
f396762e22
commit
b1de0e037d
7 files changed
+40
-35
No files matched your search
@@ -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`",
|
||||
|
||||
Reference in new issue
Block a user