mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Introduce TypeInstId (#5288)
TypeInstId is an InstId whose constant value has a type of TypeType. This includes: - Type value instructions, the `ClassType` or `IntLiteralType` instructions. - Constraint value instructions, which are the `FacetType` and `TypeType` instructions, each of which also have type TypeType. TypeInstId encodes in the type system that it is safe to convert the instruction's value to a TypeId, and CHECKs at construction that this invariant is maintained. --------- Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
co-authored by
Richard Smith
parent
03a31bd0de
commit
cf57c85545
@@ -130,6 +130,10 @@ class DeductionWorklist {
|
||||
Add(inst_id, SemIR::InstId(arg), needs_substitution);
|
||||
break;
|
||||
}
|
||||
case CARBON_KIND(SemIR::TypeInstId inst_id): {
|
||||
Add(inst_id, SemIR::InstId(arg), needs_substitution);
|
||||
break;
|
||||
}
|
||||
case CARBON_KIND(SemIR::StructTypeFieldsId fields_id): {
|
||||
AddAll(fields_id, SemIR::StructTypeFieldsId(arg), needs_substitution);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user