diff --git a/compiler/cli/src/org/jetbrains/jet/cli/jvm/repl/ReplInterpreter.java b/compiler/cli/src/org/jetbrains/jet/cli/jvm/repl/ReplInterpreter.java index fbf839f6e6f..de1a509ec24 100644 --- a/compiler/cli/src/org/jetbrains/jet/cli/jvm/repl/ReplInterpreter.java +++ b/compiler/cli/src/org/jetbrains/jet/cli/jvm/repl/ReplInterpreter.java @@ -190,6 +190,7 @@ public class ReplInterpreter { } injector.getTopDownAnalyzer().prepareForTheNextReplLine(); + trace.clearDiagnostics(); psiFile.getScript().putUserData(ScriptHeaderResolver.PRIORITY_KEY, lineNumber); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/BindingTraceContext.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/BindingTraceContext.java index 48f3da2d204..3eddd9bf206 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/BindingTraceContext.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/BindingTraceContext.java @@ -59,6 +59,10 @@ public class BindingTraceContext implements BindingTrace { diagnostics.add(diagnostic); } + public void clearDiagnostics() { + diagnostics.clear(); + } + @Override public BindingContext getBindingContext() { return bindingContext; diff --git a/compiler/tests/org/jetbrains/jet/repl/ReplInterpreterTest.java b/compiler/tests/org/jetbrains/jet/repl/ReplInterpreterTest.java index 6609fcfc8a9..0a3c1e559b6 100644 --- a/compiler/tests/org/jetbrains/jet/repl/ReplInterpreterTest.java +++ b/compiler/tests/org/jetbrains/jet/repl/ReplInterpreterTest.java @@ -134,8 +134,7 @@ public class ReplInterpreterTest { @Test public void analyzeErrors() { - // TODO - //testFile("analyzeErrors.repl"); + testFile("analyzeErrors.repl"); } @Test