mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 08:54:47 +01:00
Handle import refs in TryGetExistingDecl (#7620)
This solves the problem where `interface` imports are incorrectly diagnosed as duplicate names in impl files. Follows the implementation logic used in `handle_class.cpp`. --------- Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
co-authored by
Richard Smith
parent
0f93cbd370
commit
1f22ba91bb
@@ -78,9 +78,6 @@ static auto BuildInterfaceDecl(Context& context,
|
||||
auto existing_interface_decl = existing_decl->As<SemIR::InterfaceDecl>();
|
||||
interface_decl.interface_id = existing_interface_decl.interface_id;
|
||||
interface_decl.type_id = existing_interface_decl.type_id;
|
||||
// TODO: If the new declaration is a definition, keep its parameter
|
||||
// and implicit parameter lists rather than the ones from the
|
||||
// previous declaration.
|
||||
|
||||
auto prev_decl_generic_id =
|
||||
context.interfaces().Get(interface_decl.interface_id).generic_id;
|
||||
|
||||
Reference in New Issue
Block a user