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

Unified Diff: pkg/analyzer/lib/src/dart/element/member.dart

Issue 1814453002: Remove more calls to safelyVisit methods (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/element/member.dart
diff --git a/pkg/analyzer/lib/src/dart/element/member.dart b/pkg/analyzer/lib/src/dart/element/member.dart
index 28bce1e1bc63f10cc455b54aabb1487854148902..12ff6f04e65a60bdd81b36761fd53a2eb24b7094 100644
--- a/pkg/analyzer/lib/src/dart/element/member.dart
+++ b/pkg/analyzer/lib/src/dart/element/member.dart
@@ -524,6 +524,7 @@ abstract class Member implements Element {
/**
* If the given [child] is not `null`, use the given [visitor] to visit it.
*/
+ @deprecated
void safelyVisitChild(Element child, ElementVisitor visitor) {
// TODO(brianwilkerson) Make this private
if (child != null) {
@@ -1017,10 +1018,12 @@ abstract class VariableMember extends Member implements VariableElement {
bool get isFinal => baseElement.isFinal;
@override
+ @deprecated
bool get isPotentiallyMutatedInClosure =>
baseElement.isPotentiallyMutatedInClosure;
@override
+ @deprecated
bool get isPotentiallyMutatedInScope =>
baseElement.isPotentiallyMutatedInScope;
@@ -1032,6 +1035,6 @@ abstract class VariableMember extends Member implements VariableElement {
// TODO(brianwilkerson) We need to finish implementing the accessors used
// below so that we can safely invoke them.
super.visitChildren(visitor);
- safelyVisitChild(baseElement.initializer, visitor);
+ baseElement.initializer?.accept(visitor);
}
}
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698