mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 20:42:01 +01:00
When converting an expression to type type, retain the resulting instruction as well as the TypeId. (#4355)
The `TypeId` is lossy, as it represents only the canonical type, and not the specific computation that produced it.
This commit is contained in:
@@ -58,7 +58,7 @@ auto HandleParseNode(Context& context, Parse::StructFieldId node_id) -> bool {
|
||||
auto HandleParseNode(Context& context, Parse::StructTypeFieldId node_id)
|
||||
-> bool {
|
||||
auto [type_node, type_id] = context.node_stack().PopExprWithNodeId();
|
||||
SemIR::TypeId cast_type_id = ExprAsType(context, type_node, type_id);
|
||||
SemIR::TypeId cast_type_id = ExprAsType(context, type_node, type_id).type_id;
|
||||
|
||||
auto [name_node, name_id] = context.node_stack().PopNameWithNodeId();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user