Index: compiler/java/com/google/dart/compiler/resolver/TopLevelElementBuilder.java |
diff --git a/compiler/java/com/google/dart/compiler/resolver/TopLevelElementBuilder.java b/compiler/java/com/google/dart/compiler/resolver/TopLevelElementBuilder.java |
index 080d3bd0637bfa240ae04ad42a59cca98aef5565..07abae93c7bc0f9659ce7f98e092a570ae91b643 100644 |
--- a/compiler/java/com/google/dart/compiler/resolver/TopLevelElementBuilder.java |
+++ b/compiler/java/com/google/dart/compiler/resolver/TopLevelElementBuilder.java |
@@ -123,6 +123,10 @@ public class TopLevelElementBuilder { |
Element oldElement = scope.declareElement(newElement.getName(), newElement); |
// We had already node with such name, report duplicate. |
if (oldElement != null) { |
+ // ignore "assert" |
+ if (Elements.isArtificialAssertMethod(oldElement)) { |
+ return; |
+ } |
// Getter/setter can shared same name, but not setter/setter and getter/getter. |
if (newElement.getModifiers().isAbstractField() |
&& oldElement.getModifiers().isAbstractField()) { |