KT-2207 Syntax errors are not reported from the compiler
#KT-2207 fixed
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user