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

Unified Diff: pkg/analyzer/lib/src/context/cache.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/context/cache.dart
diff --git a/pkg/analyzer/lib/src/context/cache.dart b/pkg/analyzer/lib/src/context/cache.dart
index f539e2ed193549209e3d6ba4f9421ec6678dc7c6..7e6e0a05ef578a9c8ebc480f42bc7cc0676ccce3 100644
--- a/pkg/analyzer/lib/src/context/cache.dart
+++ b/pkg/analyzer/lib/src/context/cache.dart
@@ -359,8 +359,9 @@ class CacheEntry {
}
});
_resultMap.clear();
- if (target is ElementImpl) {
- (target as ElementImpl).setModifier(Modifier.CACHE_KEY, false);
+ AnalysisTarget oldTarget = target;
+ if (oldTarget is ElementImpl) {
+ oldTarget.setModifier(Modifier.CACHE_KEY, false);
}
}

Powered by Google App Engine
This is Rietveld 408576698