mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Initial 'export name' handling. (#3949)
This adds a `BindExport` instruction in order to better track the location of the `export` itself, but a `bind_name_id` is also added to `ImportRef` so that we know quickly where to put it in name lookup. Merging identical names is a TODO. I haven't quite decided how best to achieve that, because I do think the BindExport should be what's actually added to name lookup. Also, I will probably add a mode to DeclNameStack that blocks non-namespace scopes. This seems to already be an error, but the wrong one (maybe due to lack of support for cross-file decl/def support).
This commit is contained in:
@@ -106,8 +106,8 @@ static auto BuildInterfaceWitness(
|
||||
CARBON_FATAL() << "Unexpected type: " << type_inst;
|
||||
}
|
||||
auto& fn = context.functions().Get(fn_type->function_id);
|
||||
auto impl_decl_id =
|
||||
context.LookupNameInExactScope(decl_id, fn.name_id, impl_scope);
|
||||
auto impl_decl_id = context.LookupNameInExactScope(
|
||||
decl_id, fn.name_id, impl.scope_id, impl_scope);
|
||||
if (impl_decl_id.is_valid()) {
|
||||
used_decl_ids.push_back(impl_decl_id);
|
||||
table.push_back(CheckAssociatedFunctionImplementation(
|
||||
|
||||
Reference in New Issue
Block a user