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:
Richard Smith
2024-07-17 01:39:25 +00:00
committed by GitHub
parent 5edd2358e8
commit fe359b1a08
36 changed files with 398 additions and 292 deletions
+5
View File
@@ -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.