Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Unified Diff: pkg/analyzer/lib/src/generated/resolver.dart

Issue 2261053002: Supress deprecation warnings in a deprecated library (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: clean up Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index db027ac334764d8cda47c491d0c0899ed09f3030..77e80597618192a907cd7a8c30b39ead364a4488 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -56,7 +56,7 @@ class BestPracticesVerifier extends RecursiveAstVisitor<Object> {
* A flag indicating whether a surrounding member (compilation unit or class)
* is deprecated.
*/
- bool inDeprecatedMember = false;
+ bool inDeprecatedMember;
/**
* The error reporter by which errors will be reported.
@@ -88,7 +88,9 @@ class BestPracticesVerifier extends RecursiveAstVisitor<Object> {
this._errorReporter, TypeProvider typeProvider, this._currentLibrary,
{TypeSystem typeSystem})
: _futureNullType = typeProvider.futureNullType,
- _typeSystem = typeSystem ?? new TypeSystemImpl();
+ _typeSystem = typeSystem ?? new TypeSystemImpl() {
+ inDeprecatedMember = _currentLibrary.isDeprecated;
+ }
@override
Object visitAnnotation(Annotation node) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698