mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 07:34:45 +01:00
When performing name lookup, determine the generic instance within which the lookup result was found. (#4118)
Require types into which qualified lookup is performed to be completely defined. Eventually this will trigger substitution into the definition for generic types.
This commit is contained in:
@@ -281,6 +281,13 @@ auto GetConstantInInstance(Context& context,
|
||||
return context.constant_values().Get(symbolic.inst_id);
|
||||
}
|
||||
|
||||
auto GetConstantValueInInstance(Context& context,
|
||||
SemIR::GenericInstanceId instance_id,
|
||||
SemIR::InstId inst_id) -> SemIR::ConstantId {
|
||||
return GetConstantInInstance(context, instance_id,
|
||||
context.constant_values().Get(inst_id));
|
||||
}
|
||||
|
||||
auto GetTypeInInstance(Context& context, SemIR::GenericInstanceId instance_id,
|
||||
SemIR::TypeId type_id) -> SemIR::TypeId {
|
||||
auto const_id = context.types().GetConstantId(type_id);
|
||||
|
||||
Reference in New Issue
Block a user