mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 22:02:52 +01:00
Separate inst kind for out params (#4442)
This commit is contained in:
@@ -46,9 +46,7 @@ auto HandleParseNode(Context& context, Parse::ReturnTypeId node_id) -> bool {
|
||||
auto type_id = ExprAsType(context, type_node_id, type_inst_id).type_id;
|
||||
auto return_slot_id = context.AddPatternInst<SemIR::ReturnSlotPattern>(
|
||||
node_id, {.type_id = type_id, .type_inst_id = type_inst_id});
|
||||
// TODO: Use a separate inst kind here and for the corresponding Param,
|
||||
// to capture the fact that the corresponding Param is not a value expression.
|
||||
auto param_pattern_id = context.AddPatternInst<SemIR::ParamPattern>(
|
||||
auto param_pattern_id = context.AddPatternInst<SemIR::OutParamPattern>(
|
||||
node_id, {.type_id = type_id,
|
||||
.subpattern_id = return_slot_id,
|
||||
.runtime_index = SemIR::RuntimeParamIndex::Unknown});
|
||||
|
||||
Reference in New Issue
Block a user