Index: pkg/compiler/lib/src/typechecker.dart |
diff --git a/pkg/compiler/lib/src/typechecker.dart b/pkg/compiler/lib/src/typechecker.dart |
index 74b9659d39e1bf3c60dc4a426305e3ca51a394d2..3b075b0d0692b6b621f8584f77e0d489673cb870 100644 |
--- a/pkg/compiler/lib/src/typechecker.dart |
+++ b/pkg/compiler/lib/src/typechecker.dart |
@@ -602,6 +602,12 @@ class TypeCheckerVisitor extends Visitor<DartType> { |
return type; |
} |
+ DartType visitAssert(Assert node) { |
+ analyze(node.condition); |
+ if (node.hasMessage) analyze(node.message); |
+ return const StatementType(); |
+ } |
+ |
DartType visitBlock(Block node) { |
return analyze(node.statements); |
} |
@@ -1170,10 +1176,6 @@ class TypeCheckerVisitor extends Visitor<DartType> { |
} |
DartType visitSend(Send node) { |
- if (elements.isAssert(node)) { |
- return analyzeInvocation(node, const AssertAccess()); |
- } |
- |
Element element = elements[node]; |
if (element != null && element.isConstructor) { |