Allow to separate top-level script declarations and statements with semicolon
This fix allows to write one-liner scripts like "val x = 3; println(x)", which were previously rejected by the parser.
This commit is contained in:
@@ -2607,6 +2607,11 @@ public class ParsingTestGenerated extends AbstractParsingTest {
|
||||
runTest("compiler/testData/psi/script/manyAnnotationsOnFile.kts");
|
||||
}
|
||||
|
||||
@TestMetadata("OneLiner.kts")
|
||||
public void testOneLiner() throws Exception {
|
||||
runTest("compiler/testData/psi/script/OneLiner.kts");
|
||||
}
|
||||
|
||||
@TestMetadata("Shebang.kts")
|
||||
public void testShebang() throws Exception {
|
||||
runTest("compiler/testData/psi/script/Shebang.kts");
|
||||
|
||||
Reference in New Issue
Block a user