| Index: compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
|
| diff --git a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
|
| index 85eced086f74f29387e49bf38da26c6870abf6b9..a3956a14f465c0649d8136032ee814314627dd02 100644
|
| --- a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
|
| +++ b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
|
| @@ -1633,23 +1633,6 @@ public class TypeAnalyzer implements DartCompilationPhase {
|
| }
|
|
|
| @Override
|
| - public Type visitExprStmt(DartExprStmt node) {
|
| - // special support for incomplete "assert"
|
| - if (node.getExpression() instanceof DartIdentifier) {
|
| - DartIdentifier identifier = (DartIdentifier) node.getExpression();
|
| - NodeElement element = identifier.getElement();
|
| - if (Objects.equal(identifier.getName(), "assert")
|
| - && Elements.isArtificialAssertMethod(element)) {
|
| - onError(node, TypeErrorCode.ASSERT_NUMBER_ARGUMENTS);
|
| - return voidType;
|
| - }
|
| - }
|
| - // normal
|
| - typeOf(node.getExpression());
|
| - return voidType;
|
| - }
|
| -
|
| - @Override
|
| public Type visitFieldDefinition(DartFieldDefinition node) {
|
| node.visitChildren(this);
|
| return voidType;
|
| @@ -2552,10 +2535,9 @@ public class TypeAnalyzer implements DartCompilationPhase {
|
| restoreOnBlockExit.put(restoreBlock, variableRestorer);
|
| inferVariableTypesFromIsConditions(condition, variableRestorer);
|
| }
|
| - } else {
|
| - onError(node, TypeErrorCode.ASSERT_NUMBER_ARGUMENTS);
|
| + // done for "assert"
|
| + return voidType;
|
| }
|
| - return voidType;
|
| }
|
| // normal invocation
|
| Type type;
|
|
|