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

Unified Diff: pkg/kernel/lib/transformations/closure/converter.dart

Issue 2752823003: Remove unnecessary casts. (Closed)
Patch Set: Created 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/transformations/closure/converter.dart
diff --git a/pkg/kernel/lib/transformations/closure/converter.dart b/pkg/kernel/lib/transformations/closure/converter.dart
index 9ebd806e1dd6344c1593c272fb21142a0446fb86..8b9ab5cca57e8c13dcf410b0d14687f9df200cfc 100644
--- a/pkg/kernel/lib/transformations/closure/converter.dart
+++ b/pkg/kernel/lib/transformations/closure/converter.dart
@@ -676,8 +676,8 @@ class ClosureConverter extends Transformer {
String closureClassName = createNameForClosureClass(procedure.function);
Class closureClass = null;
for (TreeNode node in newLibraryMembers) {
- if (node is Class && (node as Class).name == closureClassName) {
- closureClass = node as Class;
+ if (node is Class && node.name == closureClassName) {
ahe 2017/03/16 09:37:09 Because of the test "node is Class", the compiler
Dmitry Stefantsov 2017/03/16 09:42:10 Thanks!
+ closureClass = node;
}
}
if (closureClass == null) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698