mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Fix SemIR not showing insts used to compute FieldDecl type (#7706)
Add an `ExprRegionId` to `FieldDecl`. This required moving the `NameId` into `Field`.
This commit is contained in:
@@ -123,7 +123,7 @@ static auto AddStructTypeFields(
|
||||
SemIR::ElementIndex{static_cast<int>(struct_type_fields.size())};
|
||||
if (field_decl.type_id == SemIR::ErrorInst::TypeId) {
|
||||
struct_type_fields.push_back(
|
||||
{.name_id = field_decl.name_id,
|
||||
{.name_id = field.name_id,
|
||||
.type_inst_id = SemIR::ErrorInst::TypeInstId});
|
||||
continue;
|
||||
}
|
||||
@@ -131,7 +131,7 @@ static auto AddStructTypeFields(
|
||||
context.sem_ir().types().GetAs<SemIR::UnboundElementType>(
|
||||
field_decl.type_id);
|
||||
struct_type_fields.push_back(
|
||||
{.name_id = field_decl.name_id,
|
||||
{.name_id = field.name_id,
|
||||
.type_inst_id = unbound_element_type.element_type_inst_id});
|
||||
}
|
||||
auto fields_id =
|
||||
|
||||
Reference in New Issue
Block a user