mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Distinguish between name IDs and string IDs in the type system. (#3341)
Add a `NameId` that is effectively just a wrapper around a `StringId`, with some additional predefined values for names that don't correspond to strings, such as the name of `self` or the function's return slot.
This commit is contained in:
@@ -41,7 +41,7 @@ auto HandleStructFieldUnknown(Context& context, Parse::Node parse_node)
|
||||
auto HandleStructFieldValue(Context& context, Parse::Node parse_node) -> bool {
|
||||
auto [value_parse_node, value_inst_id] =
|
||||
context.node_stack().PopExpressionWithParseNode();
|
||||
IdentifierId name_id = context.node_stack().Pop<Parse::NodeKind::Name>();
|
||||
SemIR::NameId name_id = context.node_stack().Pop<Parse::NodeKind::Name>();
|
||||
|
||||
// Store the name for the type.
|
||||
context.args_type_info_stack().AddInst(SemIR::StructTypeField{
|
||||
|
||||
Reference in New Issue
Block a user