CQ. Rename InterfaceScope to InstanceScope.

Change-Id: If182c8a7baf476dde2b5f66c6cb7c7f87ff201cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368761
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
Konstantin Shcheglov 2024-05-30 21:33:48 +00:00 committed by Commit Queue
parent 65bcf1b0ab
commit cecc7c8567
3 changed files with 12 additions and 12 deletions

View file

@ -99,9 +99,9 @@ class FormalParameterScope extends EnclosedScope {
}
}
/// The scope defined by an interface element.
class InterfaceScope extends EnclosedScope {
InterfaceScope(super.parent, InstanceElement element) {
/// The scope defined by an instance element.
class InstanceScope extends EnclosedScope {
InstanceScope(super.parent, InstanceElement element) {
var augmented = element.augmented;
augmented.accessors.forEach(_addPropertyAccessor);
augmented.methods.forEach(_addGetter);

View file

@ -4309,7 +4309,7 @@ class ScopeResolverVisitor extends UnifyingAstVisitor<void> {
node.nameScope = nameScope;
visitClassDeclarationInScope(node);
nameScope = InterfaceScope(nameScope, element);
nameScope = InstanceScope(nameScope, element);
visitClassMembersInScope(node);
} finally {
nameScope = outerScope;
@ -4335,7 +4335,7 @@ class ScopeResolverVisitor extends UnifyingAstVisitor<void> {
Scope outerScope = nameScope;
try {
ClassElement element = node.declaredElement!;
nameScope = InterfaceScope(
nameScope = InstanceScope(
TypeParameterScope(nameScope, element.typeParameters),
element,
);
@ -4456,7 +4456,7 @@ class ScopeResolverVisitor extends UnifyingAstVisitor<void> {
node.nameScope = nameScope;
visitEnumDeclarationInScope(node);
nameScope = InterfaceScope(nameScope, element);
nameScope = InstanceScope(nameScope, element);
visitEnumMembersInScope(node);
} finally {
nameScope = outerScope;
@ -4530,7 +4530,7 @@ class ScopeResolverVisitor extends UnifyingAstVisitor<void> {
node.representation.accept(this);
node.implementsClause?.accept(this);
nameScope = InterfaceScope(nameScope, element);
nameScope = InstanceScope(nameScope, element);
visitDocumentationComment(node.documentationComment);
node.members.accept(this);
} finally {
@ -4898,7 +4898,7 @@ class ScopeResolverVisitor extends UnifyingAstVisitor<void> {
node.nameScope = nameScope;
visitMixinDeclarationInScope(node);
nameScope = InterfaceScope(nameScope, element);
nameScope = InstanceScope(nameScope, element);
visitMixinMembersInScope(node);
} finally {
nameScope = outerScope;

View file

@ -80,7 +80,7 @@ class ReferenceResolver extends ThrowingAstVisitor<void> {
node.withClause?.accept(this);
node.implementsClause?.accept(this);
scope = InterfaceScope(scope, element);
scope = InstanceScope(scope, element);
LinkingNodeContext(node, scope);
node.members.accept(this);
@ -147,7 +147,7 @@ class ReferenceResolver extends ThrowingAstVisitor<void> {
node.implementsClause?.accept(this);
node.withClause?.accept(this);
scope = InterfaceScope(scope, element);
scope = InstanceScope(scope, element);
LinkingNodeContext(node, scope);
node.members.accept(this);
@ -203,7 +203,7 @@ class ReferenceResolver extends ThrowingAstVisitor<void> {
node.representation.accept(this);
node.implementsClause?.accept(this);
scope = InterfaceScope(scope, element);
scope = InstanceScope(scope, element);
LinkingNodeContext(node, scope);
LinkingNodeContext(node.representation, scope);
@ -375,7 +375,7 @@ class ReferenceResolver extends ThrowingAstVisitor<void> {
node.onClause?.accept(this);
node.implementsClause?.accept(this);
scope = InterfaceScope(scope, element);
scope = InstanceScope(scope, element);
LinkingNodeContext(node, scope);
node.members.accept(this);