Chromium Code Reviews| Index: lib/compiler/implementation/dart_backend/backend.dart |
| diff --git a/lib/compiler/implementation/dart_backend/backend.dart b/lib/compiler/implementation/dart_backend/backend.dart |
| index a896995c3fefa1892d43c17421cce5ac131b485d..86745d56cd3640ba0fbdd0c67212975d8890dc12 100644 |
| --- a/lib/compiler/implementation/dart_backend/backend.dart |
| +++ b/lib/compiler/implementation/dart_backend/backend.dart |
| @@ -152,7 +152,12 @@ class ReferencedElementCollector extends AbstractVisitor { |
| compiler, typeElement, new TreeElementMapping(), typedefs, classes) |
| .collect(); |
| } |
| - if (typeElement.isClass()) classes.add(typeElement); |
| + if (typeElement.isClass() && !classes.contains(typeElement)) { |
| + classes.add(typeElement); |
| + new ReferencedElementCollector( |
|
Anton Muhin
2012/08/13 08:01:01
please, do not duplicate the code, but move it bel
Roman
2012/08/13 08:14:06
Done.
|
| + compiler, typeElement, new TreeElementMapping(), typedefs, classes) |
| + .collect(); |
| + } |
| typeAnnotation.visitChildren(this); |
| } |