[L] Change in dart/sdk[main]: CQ. Use _withScope / _withTypeParameterScope in ReferenceResolver.

0 views
Skip to first unread message

Paul Berry (Gerrit)

unread,
Feb 15, 2026, 6:54:22 PM (21 hours ago) Feb 15
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
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: I18446b3da921f4422a649873abf3dca5566cfd98
Gerrit-Change-Number: 480860
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: Sun, 15 Feb 2026 23:54:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Konstantin Shcheglov (Gerrit)

unread,
Feb 15, 2026, 7:32:10 PM (21 hours ago) Feb 15
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: I18446b3da921f4422a649873abf3dca5566cfd98
Gerrit-Change-Number: 480860
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: Mon, 16 Feb 2026 00:32:07 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Commit Queue (Gerrit)

unread,
Feb 15, 2026, 7:32:25 PM (21 hours ago) Feb 15
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 _withScope / _withTypeParameterScope in ReferenceResolver.

Introduce `_withScope` and `_withTypeParameterScope` helpers and use
them throughout outline resolution (classes, enums, extensions, methods,
functions, and parameters) instead of open-coded “save/restore scope”
blocks. This reduces boilerplate and makes nesting of
TypeParameterScope/InstanceScope/ExtensionScope consistent.

Also fix an outline resolution bug for instance fields in classes with a
primary constructor: field type annotations were being resolved in the
primary-constructor initializer scope. That allowed primary constructor
parameters to shadow names that should come from the surrounding class
scope (e.g. the class name in `A? field`). Field type annotations are
now resolved in the class scope, while initializer expressions continue
to use the constructor-initializer scope when applicable.
Change-Id: I18446b3da921f4422a649873abf3dca5566cfd98
Reviewed-by: Paul Berry <paul...@google.com>
Commit-Queue: Konstantin Shcheglov <sche...@google.com>
Files:
  • M pkg/analyzer/lib/src/summary2/reference_resolver.dart
  • M pkg/analyzer/test/src/dart/resolution/class_test.dart
  • M pkg/analyzer/test/src/summary/elements/class_test.dart
Change size: L
Delta: 3 files changed, 296 insertions(+), 273 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: I18446b3da921f4422a649873abf3dca5566cfd98
Gerrit-Change-Number: 480860
Gerrit-PatchSet: 3
Gerrit-Owner: Konstantin Shcheglov <sche...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages