|
@@ -965,7 +965,7 @@ class ImportRefResolver {
|
|
|
}
|
|
}
|
|
|
case CARBON_KIND(SemIR::FacetType inst): {
|
|
case CARBON_KIND(SemIR::FacetType inst): {
|
|
|
const SemIR::FacetTypeInfo& facet_type_info =
|
|
const SemIR::FacetTypeInfo& facet_type_info =
|
|
|
- context_.sem_ir().facet_types().Get(inst.facet_type_id);
|
|
|
|
|
|
|
+ context_.facet_types().Get(inst.facet_type_id);
|
|
|
// This is specifically the facet type produced by an interface
|
|
// This is specifically the facet type produced by an interface
|
|
|
// declaration, and so should consist of a single interface.
|
|
// declaration, and so should consist of a single interface.
|
|
|
// TODO: Will also have to handle named constraints here, once those are
|
|
// TODO: Will also have to handle named constraints here, once those are
|
|
@@ -2015,7 +2015,7 @@ class ImportRefResolver {
|
|
|
context_.constant_values().GetInstId(interface_const_id));
|
|
context_.constant_values().GetInstId(interface_const_id));
|
|
|
if (auto facet_type = interface_const_inst.TryAs<SemIR::FacetType>()) {
|
|
if (auto facet_type = interface_const_inst.TryAs<SemIR::FacetType>()) {
|
|
|
const SemIR::FacetTypeInfo& facet_type_info =
|
|
const SemIR::FacetTypeInfo& facet_type_info =
|
|
|
- context_.sem_ir().facet_types().Get(facet_type->facet_type_id);
|
|
|
|
|
|
|
+ context_.facet_types().Get(facet_type->facet_type_id);
|
|
|
auto interface_type = facet_type_info.TryAsSingleInterface();
|
|
auto interface_type = facet_type_info.TryAsSingleInterface();
|
|
|
CARBON_CHECK(interface_type);
|
|
CARBON_CHECK(interface_type);
|
|
|
interface_id = interface_type->interface_id;
|
|
interface_id = interface_type->interface_id;
|
|
@@ -2095,7 +2095,7 @@ class ImportRefResolver {
|
|
|
context_.constant_values().GetInstId(interface_const_id));
|
|
context_.constant_values().GetInstId(interface_const_id));
|
|
|
if (auto facet_type = interface_const_inst.TryAs<SemIR::FacetType>()) {
|
|
if (auto facet_type = interface_const_inst.TryAs<SemIR::FacetType>()) {
|
|
|
const SemIR::FacetTypeInfo& new_facet_type_info =
|
|
const SemIR::FacetTypeInfo& new_facet_type_info =
|
|
|
- context_.sem_ir().facet_types().Get(facet_type->facet_type_id);
|
|
|
|
|
|
|
+ context_.facet_types().Get(facet_type->facet_type_id);
|
|
|
impls_constraints.append(new_facet_type_info.impls_constraints);
|
|
impls_constraints.append(new_facet_type_info.impls_constraints);
|
|
|
} else {
|
|
} else {
|
|
|
auto generic_interface_type =
|
|
auto generic_interface_type =
|
|
@@ -2109,7 +2109,7 @@ class ImportRefResolver {
|
|
|
}
|
|
}
|
|
|
// TODO: Also process the other requirements.
|
|
// TODO: Also process the other requirements.
|
|
|
SemIR::FacetTypeId facet_type_id =
|
|
SemIR::FacetTypeId facet_type_id =
|
|
|
- context_.sem_ir().facet_types().Add(SemIR::FacetTypeInfo{
|
|
|
|
|
|
|
+ context_.facet_types().Add(SemIR::FacetTypeInfo{
|
|
|
.impls_constraints = impls_constraints,
|
|
.impls_constraints = impls_constraints,
|
|
|
.requirement_block_id = SemIR::InstBlockId::Invalid});
|
|
.requirement_block_id = SemIR::InstBlockId::Invalid});
|
|
|
return ResolveAs<SemIR::FacetType>(
|
|
return ResolveAs<SemIR::FacetType>(
|