mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +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
@@ -419,10 +419,6 @@ auto MatchContext::DoEmitPatternMatch(Context& context,
|
||||
|
||||
switch (kind_) {
|
||||
case MatchKind::Caller: {
|
||||
CARBON_CHECK(
|
||||
static_cast<size_t>(param_pattern.index.index) == call_args_.size(),
|
||||
"Parameters out of order; expecting {0} but got {1}",
|
||||
call_args_.size(), param_pattern.index.index);
|
||||
CARBON_CHECK(entry.scrutinee_id.has_value());
|
||||
if (entry.scrutinee_id == SemIR::ErrorInst::InstId) {
|
||||
call_args_.push_back(SemIR::ErrorInst::InstId);
|
||||
@@ -446,7 +442,7 @@ auto MatchContext::DoEmitPatternMatch(Context& context,
|
||||
.kind = ParamKindFor(context, param_pattern, entry, form_kind),
|
||||
.type_id =
|
||||
ExtractScrutineeType(context.sem_ir(), param_pattern.type_id),
|
||||
.index = param_pattern.index,
|
||||
.index = SemIR::CallParamIndex(call_params_.size()),
|
||||
.pretty_name_id = SemIR::GetPrettyNameFromPatternId(
|
||||
context.sem_ir(), entry.pattern_id)};
|
||||
auto param_id =
|
||||
|
||||
Reference in New Issue
Block a user