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

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

Issue 1917203002: Remove more type casts (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
Index: pkg/analyzer/lib/src/generated/incremental_resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/incremental_resolver.dart b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
index d0620ca7d847c6516e299222e2973123be3ff5f1..2b98d4aac8180a02c8f96616c0214d51599e9c2a 100644
--- a/pkg/analyzer/lib/src/generated/incremental_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
@@ -423,8 +423,9 @@ class DeclarationMatcher extends RecursiveAstVisitor {
(node.parent as VariableDeclarationList).type, element.type);
// matches, restore the existing element
node.name.staticElement = element;
- if (element is VariableElementImpl) {
- (element as VariableElementImpl).initializer = newElement.initializer;
+ Element variable = element;
+ if (variable is VariableElementImpl) {
+ variable.initializer = newElement.initializer;
}
}

Powered by Google App Engine
This is Rietveld 408576698