mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Add the form ID to FormParamPattern (#6928)
This enables some nice simplifications, and it's also a step toward a broader restructuring of binding and parameter patterns. Assisted-by: Gemini 3.1 Pro via Antigravity
This commit is contained in:
@@ -127,12 +127,13 @@ static auto ClonePattern(Context& context, SemIR::SpecificId specific_id,
|
||||
}
|
||||
|
||||
// Rebuild parameter.
|
||||
if (param) {
|
||||
if (param && new_pattern_id != SemIR::ErrorInst::InstId) {
|
||||
new_pattern_id = RebuildPatternInst<SemIR::AnyParamPattern>(
|
||||
context, param_id,
|
||||
{.kind = param->kind,
|
||||
.type_id = get_type(param_id),
|
||||
.subpattern_id = new_pattern_id});
|
||||
.subpattern_id = new_pattern_id,
|
||||
.form_id = SemIR::ConstantId::None});
|
||||
}
|
||||
|
||||
return new_pattern_id;
|
||||
|
||||
Reference in New Issue
Block a user