Index: pkg/compiler/lib/src/closure.dart |
diff --git a/pkg/compiler/lib/src/closure.dart b/pkg/compiler/lib/src/closure.dart |
index 0f8f218349210af203eaacf058fd2c03c3d5a11f..f7d74f812cca80cdbfac3112545155347e5d6f7f 100644 |
--- a/pkg/compiler/lib/src/closure.dart |
+++ b/pkg/compiler/lib/src/closure.dart |
@@ -786,6 +786,8 @@ class ClosureTranslator extends Visitor { |
} else if (node.isTypeCast) { |
DartType type = elements.getType(node.arguments.head); |
analyzeType(type); |
+ } else if (elements.isAssert(node) && !compiler.enableUserAssertions) { |
+ return; |
} |
node.visitChildren(this); |
} |