mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 19:01:07 +01:00
When diagnosing a duplicated name, add the name to the diagnosis (#4902)
In order to have the name available for diagnostics, we now always set `NameId` in `NameContext` and put `poisoning_loc_id` as part of the union with `resolved_inst_id` instead (since we never need both).
This commit is contained in:
@@ -105,7 +105,8 @@ static auto BuildInterfaceDecl(Context& context,
|
||||
}
|
||||
} else {
|
||||
// This is a redeclaration of something other than a interface.
|
||||
DiagnoseDuplicateName(context, name_context.loc_id, existing_id);
|
||||
DiagnoseDuplicateName(context, name_context.name_id, name_context.loc_id,
|
||||
existing_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user