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

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

Issue 1918923003: Remove unnecessary casts and general code clean-up (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/dart/resolver/scope.dart
diff --git a/pkg/analyzer/lib/src/dart/resolver/scope.dart b/pkg/analyzer/lib/src/dart/resolver/scope.dart
index a3f0b07cda56dfddb14f93ad16a1d02ca2215709..54086d9dc144daadd579c61b2a1cbb33a6fdeba2 100644
--- a/pkg/analyzer/lib/src/dart/resolver/scope.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/scope.dart
@@ -390,9 +390,9 @@ class LibraryImportScope extends Scope {
}
}
}
- if (foundElement is MultiplyDefinedElementImpl) {
- foundElement = _removeSdkElements(
- identifier, name, foundElement as MultiplyDefinedElementImpl);
+ Element element = foundElement;
+ if (element is MultiplyDefinedElementImpl) {
+ foundElement = _removeSdkElements(identifier, name, element);
}
if (foundElement is MultiplyDefinedElementImpl) {
String foundEltName = foundElement.displayName;

Powered by Google App Engine
This is Rietveld 408576698