mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 09:41:08 +01:00
Don't elide Self when dumping the interface/constraint (#6297)
We give `Self` in an interface/constraint a location so it's not elided when trying to dump the interface/constraint. We use the location of the start of the definition, which is the scope for which the `Self` is constructed and is available in.
This commit is contained in:
@@ -138,8 +138,9 @@ auto HandleParseNode(Context& context,
|
||||
// `require` declarations.
|
||||
SemIR::TypeId self_type_id =
|
||||
GetInterfaceType(context, interface_id, self_specific_id);
|
||||
interface_info.self_param_id = AddSelfGenericParameter(
|
||||
context, self_type_id, interface_info.scope_id, /*is_template=*/false);
|
||||
interface_info.self_param_id =
|
||||
AddSelfGenericParameter(context, node_id, self_type_id,
|
||||
interface_info.scope_id, /*is_template=*/false);
|
||||
|
||||
// Enter the interface scope.
|
||||
context.scope_stack().PushForEntity(decl_inst_id, interface_info.scope_id,
|
||||
|
||||
Reference in New Issue
Block a user