KT-2207 Syntax errors are not reported from the compiler

#KT-2207 fixed
This commit is contained in:
Svetlana Isakova
2012-06-07 18:28:37 +04:00
parent 07d519a2d0
commit ec5aed82af
4 changed files with 20 additions and 0 deletions
@@ -148,5 +148,10 @@ public final class AnalyzerWithCompilerReport {
super(psiElement, SYNTAX_ERROR_FACTORY, severity);
this.message = message;
}
@Override
public boolean isValid() {
return true;
}
}
}
@@ -0,0 +1,3 @@
OUT ERROR: [TestData]/test.kt: (4, 20) Expecting an element
ERR exec() finished with COMPILATION_ERROR return code
Return code: 1
@@ -0,0 +1,5 @@
package test
fun test() {
val s = System.in
}
@@ -51,6 +51,13 @@ public class CompilerSmokeTest extends KotlinIntegrationTestBase {
runCompiler("hello.compile", "-src", "hello.kt", "-jar", jar);
}
@Test
public void syntaxErrors() throws Exception {
final String jar = tempDir.getAbsolutePath() + File.separator + "smoke.jar";
runCompiler("test.compile", "-src", "test.kt", "-jar", jar);
}
@Test
public void script() throws Exception {
runCompiler("script", "-script", "hello.ktscript", "hi", "there");