Index: pkg/analyzer/lib/src/task/dart.dart |
diff --git a/pkg/analyzer/lib/src/task/dart.dart b/pkg/analyzer/lib/src/task/dart.dart |
index 03e449dd09c722c5578adf55ee5a54d2177818c0..88a5637b42c151acca395b6380737414849262da 100644 |
--- a/pkg/analyzer/lib/src/task/dart.dart |
+++ b/pkg/analyzer/lib/src/task/dart.dart |
@@ -2678,7 +2678,7 @@ class InferStaticVariableTypeTask extends InferStaticVariableTask { |
"NodeLocator failed to find a variable's declaration"); |
} |
Expression initializer = declaration.initializer; |
- initializer.accept(new ResolutionEraser()); |
+ ResolutionEraser.erase(initializer, eraseDeclarations: false); |
ResolutionContext resolutionContext = |
ResolutionContextBuilder.contextFor(initializer, errorListener); |
ResolverVisitor visitor = new ResolverVisitor( |