Chromium Code Reviews| 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) { |