mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-03 10:25:49 +01:00
Remove index fields from ParamPatterns (#6815)
This is a step toward removing the index from `InitForm`, so that equal form values always have equal representations. --------- Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
This commit is contained in:
co-authored by
Jon Ross-Perkins
parent
9ff6b0a682
commit
6dba8ee111
@@ -40,7 +40,7 @@ auto AddReturnPatterns(Context& context, SemIR::LocId loc_id,
|
||||
case SemIR::RefForm::Kind: {
|
||||
break;
|
||||
}
|
||||
case CARBON_KIND(SemIR::InitForm init_form): {
|
||||
case CARBON_KIND(SemIR::InitForm _): {
|
||||
auto pattern_type_id =
|
||||
GetPatternType(context, form_expr.type_component_id);
|
||||
auto return_slot_pattern_id = AddPatternInst<SemIR::ReturnSlotPattern>(
|
||||
@@ -50,8 +50,7 @@ auto AddReturnPatterns(Context& context, SemIR::LocId loc_id,
|
||||
return_patterns.push_back(AddPatternInst<SemIR::OutParamPattern>(
|
||||
context, SemIR::LocId(form_expr.form_inst_id),
|
||||
{.type_id = pattern_type_id,
|
||||
.subpattern_id = return_slot_pattern_id,
|
||||
.index = init_form.index}));
|
||||
.subpattern_id = return_slot_pattern_id}));
|
||||
break;
|
||||
}
|
||||
case SemIR::ErrorInst::Kind: {
|
||||
|
||||
Reference in New Issue
Block a user