Skip to content

Commit a17969b

Browse files
scheglovCommit Queue
authored andcommitted
Parts. Deprecate also LibraryOrAugmentationElementImpl.scope
Missed it in the previous CL. Change-Id: Ib887b8423ead76907c7302036a3d2089ba85dbfb Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388720 Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]>
1 parent 807660f commit a17969b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ class LibraryAnalyzer {
157157
ResolutionVisitor(
158158
unitElement: unitElement,
159159
errorListener: errorListener,
160-
nameScope: _libraryElement.scope,
160+
nameScope: unitElement.scope,
161161
strictInference: _analysisOptions.strictInference,
162162
strictCasts: _analysisOptions.strictCasts,
163163
elementWalker: ElementWalker.forCompilationUnit(
@@ -174,7 +174,7 @@ class LibraryAnalyzer {
174174
// TODO(scheglov): We don't need to do this for the whole unit.
175175
parsedUnit.accept(ScopeResolverVisitor(
176176
_libraryElement, file.source, _typeProvider, errorListener,
177-
nameScope: _libraryElement.scope));
177+
nameScope: unitElement.scope));
178178

179179
FlowAnalysisHelper flowAnalysisHelper = FlowAnalysisHelper(
180180
_testingData != null, _libraryElement.featureSet,

pkg/analyzer/lib/src/dart/element/element.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6396,6 +6396,7 @@ abstract class LibraryOrAugmentationElementImpl extends ElementImpl
63966396
return definingCompilationUnit.libraryImportPrefixes;
63976397
}
63986398

6399+
@Deprecated('Use CompilationUnitElement.scope')
63996400
@override
64006401
LibraryFragmentScope get scope {
64016402
return definingCompilationUnit.scope;

0 commit comments

Comments
 (0)