Index: compiler/javatests/com/google/dart/compiler/type/TypeTestCase.java |
diff --git a/compiler/javatests/com/google/dart/compiler/type/TypeTestCase.java b/compiler/javatests/com/google/dart/compiler/type/TypeTestCase.java |
index 61eaa74e60aa7d57d81527be1fb93557259cc0e1..fe9c9419581cbb7ff87f7a155a4cc06954e4981b 100644 |
--- a/compiler/javatests/com/google/dart/compiler/type/TypeTestCase.java |
+++ b/compiler/javatests/com/google/dart/compiler/type/TypeTestCase.java |
@@ -7,6 +7,7 @@ package com.google.dart.compiler.type; |
import com.google.dart.compiler.DartCompilationError; |
import com.google.dart.compiler.DartCompilerListener; |
import com.google.dart.compiler.ErrorCode; |
+import com.google.dart.compiler.SubSystem; |
import com.google.dart.compiler.ast.DartUnit; |
import com.google.dart.compiler.ast.DartBlock; |
import com.google.dart.compiler.ast.DartFunction; |
@@ -166,32 +167,23 @@ abstract class TypeTestCase extends TestCase { |
final DartCompilerListener listener = new DartCompilerListener() { |
@Override |
- public void compilationError(DartCompilationError event) { |
+ public void onError(DartCompilationError event) { |
throw new AssertionError(event); |
} |
@Override |
- public void compilationWarning(DartCompilationError event) { |
- compilationError(event); |
- } |
- |
- @Override |
- public void typeError(DartCompilationError event) { |
- compilationError(event); |
- } |
- |
- @Override |
public void unitCompiled(DartUnit unit) { |
} |
}; |
final TestCompilerContext context = new TestCompilerContext() { |
- @Override |
- public void typeError(DartCompilationError event) { |
- getErrorCodes().add(event.getErrorCode()); |
- expectedTypeErrors--; |
- if (expectedTypeErrors < 0) { |
- throw new TestTypeError(event); |
+ public void onError(DartCompilationError event) { |
+ if (event.getErrorCode().getSubSystem() == SubSystem.STATIC_TYPE) { |
+ getErrorCodes().add(event.getErrorCode()); |
+ expectedTypeErrors--; |
+ if (expectedTypeErrors < 0) { |
+ throw new TestTypeError(event); |
+ } |
} |
} |
}; |