Branch: refs/heads/main
Home:
https://github.com/dart-lang/sdk
Commit: ba9923c406b32238c7ad36e1b9d0827d5c280acc
https://github.com/dart-lang/sdk/commit/ba9923c406b32238c7ad36e1b9d0827d5c280acc
Author: Konstantin Shcheglov <
sche...@google.com>
Date: 2026-02-23 (Mon, 23 Feb 2026)
Changed paths:
M pkg/analyzer/lib/src/dart/resolver/scope_context.dart
M pkg/analyzer/lib/src/generated/resolver.dart
Log Message:
-----------
DeCo. Add ScopeContext.visitDocumentationComment
Centralize documentation comment traversal in ScopeContext so that all
declarations visit doc comments under a consistent
DocumentationCommentScope.
The new helper temporarily rebinds the doc-import scope’s inner scope to
the current name scope, assigns the comment’s nameScope, and then visits
the comment. This preserves correct resolution of identifiers referenced
from documentation comments while avoiding duplicated scope plumbing.
As part of the refactor:
- Remove per-call visitDocumentationComment overrides from ScopeContext’s
declaration visitors.
- Delete ScopeResolverVisitor’s private _visitDocumentationComment helper
and ScopeContext.withDocImportScope.
- Update all resolver call sites to route doc-comment visits through the
new ScopeContext API.
Change-Id: Iffbefb03cf5f61b61144a9f3a9cfc85b4df10491
Reviewed-on:
https://dart-review.googlesource.com/c/sdk/+/482981
Reviewed-by: Paul Berry <
paul...@google.com>
Commit-Queue: Konstantin Shcheglov <
sche...@google.com>
To unsubscribe from these emails, change your notification settings at
https://github.com/dart-lang/sdk/settings/notifications