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:
Dana Jansens
2025-10-30 20:47:16 +00:00
committed by GitHub
parent 656150593c
commit f272198ce5
54 changed files with 481 additions and 478 deletions
+3 -2
View File
@@ -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,