mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 10:31:03 +01:00
Rename MemberIndex -> ElementIndex, ClassFieldAccess -> ClassElementAccess, UnboundFieldType -> UnboundElementType. (#3446)
In preparation for base class support, where these types will be used for bases as well as fields. As discussed [on discord](https://discord.com/channels/655572317891461132/963846118964350976/1180267686316478575).
This commit is contained in:
@@ -88,15 +88,15 @@ auto HandleBindingPattern(Context& context, Parse::NodeId parse_node) -> bool {
|
||||
} else if (enclosing_class_decl) {
|
||||
auto& class_info =
|
||||
context.classes().Get(enclosing_class_decl->class_id);
|
||||
auto field_type_inst_id = context.AddInst(SemIR::UnboundFieldType{
|
||||
auto field_type_inst_id = context.AddInst(SemIR::UnboundElementType{
|
||||
parse_node, context.GetBuiltinType(SemIR::BuiltinKind::TypeType),
|
||||
class_info.self_type_id, cast_type_id});
|
||||
value_type_id = context.CanonicalizeType(field_type_inst_id);
|
||||
value_id = context.AddInst(
|
||||
SemIR::Field{parse_node, value_type_id, name_id,
|
||||
SemIR::MemberIndex(context.args_type_info_stack()
|
||||
.PeekCurrentBlockContents()
|
||||
.size())});
|
||||
SemIR::ElementIndex(context.args_type_info_stack()
|
||||
.PeekCurrentBlockContents()
|
||||
.size())});
|
||||
|
||||
// Add a corresponding field to the object representation of the class.
|
||||
context.args_type_info_stack().AddInst(
|
||||
|
||||
Reference in New Issue
Block a user