[L] Change in dart/sdk[main]: CQ. Use dedicated scopes in ResolutionVisitor

0 views
Skip to first unread message

Paul Berry (Gerrit)

unread,
Feb 13, 2026, 2:50:35 PM (3 days ago) Feb 13
to Konstantin Shcheglov, Johnni Winther, Commit Queue, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Johnni Winther and Konstantin Shcheglov

Paul Berry voted and added 1 comment

Votes added by Paul Berry

Code-Review+1

1 comment

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Paul Berry . resolved

lgtm! This is a really nice design improvement.

Open in Gerrit

Related details

Attention is currently required from:
  • Johnni Winther
  • Konstantin Shcheglov
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ib84d3524bda4cc0466fc2f927a612b4f20b87cbf
Gerrit-Change-Number: 480721
Gerrit-PatchSet: 2
Gerrit-Owner: Konstantin Shcheglov <sche...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
Gerrit-Reviewer: Paul Berry <paul...@google.com>
Gerrit-Attention: Konstantin Shcheglov <sche...@google.com>
Gerrit-Attention: Johnni Winther <johnni...@google.com>
Gerrit-Comment-Date: Fri, 13 Feb 2026 19:50:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Konstantin Shcheglov (Gerrit)

unread,
Feb 14, 2026, 3:03:40 PM (2 days ago) Feb 14
to Paul Berry, Johnni Winther, Commit Queue, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Johnni Winther

Konstantin Shcheglov voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention is currently required from:
  • Johnni Winther
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ib84d3524bda4cc0466fc2f927a612b4f20b87cbf
Gerrit-Change-Number: 480721
Gerrit-PatchSet: 2
Gerrit-Owner: Konstantin Shcheglov <sche...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
Gerrit-Reviewer: Paul Berry <paul...@google.com>
Gerrit-Attention: Johnni Winther <johnni...@google.com>
Gerrit-Comment-Date: Sat, 14 Feb 2026 20:03:37 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Commit Queue (Gerrit)

unread,
Feb 14, 2026, 3:25:28 PM (2 days ago) Feb 14
to Konstantin Shcheglov, Paul Berry, Johnni Winther, dart-analys...@google.com, rev...@dartlang.org

Commit Queue submitted the change

Change information

Commit message:
CQ. Use dedicated scopes in ResolutionVisitor

Replace ad-hoc name-scope setup for generic and executable declarations
with purpose-built scopes that model the language rules more precisely.

- Introduce TypeParameterScope for type parameter lists, backed by a new
helper that binds (or creates) the corresponding fragments in declaration
order without manually injecting them into LocalScope.
- Use FormalParameterScope to make non-initializing formal parameters visible
while resolving function and method bodies, and remove the manual
parameter-definition pass.
- Fix constructor scoping so initializer expressions are resolved under
ConstructorInitializerScope and primary constructor bodies split their work:
initializers run in the initializer scope, while the body runs in
PrimaryParameterScope to preserve correct shadowing and member lookup.

This tightens name resolution around primary constructors and eliminates
redundant LocalScope wrappers where guarded-pattern resolution already
creates the necessary scopes.
Change-Id: Ib84d3524bda4cc0466fc2f927a612b4f20b87cbf
Reviewed-by: Paul Berry <paul...@google.com>
Commit-Queue: Konstantin Shcheglov <sche...@google.com>
Files:
  • M pkg/analyzer/lib/src/dart/resolver/resolution_visitor.dart
  • M pkg/analyzer/test/src/dart/resolution/class_test.dart
Change size: L
Delta: 2 files changed, 201 insertions(+), 119 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Paul Berry
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ib84d3524bda4cc0466fc2f927a612b4f20b87cbf
Gerrit-Change-Number: 480721
Gerrit-PatchSet: 3
Gerrit-Owner: Konstantin Shcheglov <sche...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages