mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 18:21:16 +01:00
Substitute into generic class and interface definitions when we require them to be fully defined. (#4139)
When referring to a constant within a specific, such as a field of a generic class, use that specific version of the constant's value.
This commit is contained in:
@@ -206,6 +206,11 @@ static auto PushNameQualifierScope(Context& context,
|
||||
// parameter scope.
|
||||
context.scope_stack().PopIfEmpty();
|
||||
|
||||
// When declaring a member of a generic, resolve the self specific.
|
||||
if (instance_id.is_valid()) {
|
||||
ResolveSpecificDefinition(context, instance_id);
|
||||
}
|
||||
|
||||
context.scope_stack().Push(scope_inst_id, scope_id, instance_id, has_error);
|
||||
|
||||
// Enter a parameter scope in case the qualified name itself has parameters.
|
||||
|
||||
Reference in New Issue
Block a user