Run K2 scripts in PSI mode
This commit is contained in:
committed by
Space Team
parent
11d86992c5
commit
0a498660cb
@@ -11,6 +11,7 @@
|
|||||||
<javac srcdir="${test.data}" destdir="${temp}" includeantruntime="false">
|
<javac srcdir="${test.data}" destdir="${temp}" includeantruntime="false">
|
||||||
<withKotlin>
|
<withKotlin>
|
||||||
<compilerarg value="-version"/>
|
<compilerarg value="-version"/>
|
||||||
|
<compilerarg line="-Xuse-fir-lt=false"/>
|
||||||
</withKotlin>
|
</withKotlin>
|
||||||
</javac>
|
</javac>
|
||||||
</target>
|
</target>
|
||||||
|
|||||||
@@ -13,6 +13,12 @@ build:
|
|||||||
[javac] [TestData]/incorrectKotlinCode.kt:4:1: error: expecting ')'
|
[javac] [TestData]/incorrectKotlinCode.kt:4:1: error: expecting ')'
|
||||||
[javac]
|
[javac]
|
||||||
[javac] ^
|
[javac] ^
|
||||||
|
[javac] [TestData]/incorrectKotlinCode.kt:4:1: error: a type annotation is required on a value parameter
|
||||||
|
[javac]
|
||||||
|
[javac] ^
|
||||||
|
[javac] [TestData]/incorrectKotlinCode.kt:3:1: error: function 'main' must have a body
|
||||||
|
[javac] fun main(
|
||||||
|
[javac] ^
|
||||||
[kotlinc] Compiling [[TestData]] => [[Temp]]
|
[kotlinc] Compiling [[TestData]] => [[Temp]]
|
||||||
[kotlinc] [TestData]/incorrectKotlinCode.kt:4:1: error: parameter name expected
|
[kotlinc] [TestData]/incorrectKotlinCode.kt:4:1: error: parameter name expected
|
||||||
[kotlinc]
|
[kotlinc]
|
||||||
@@ -23,6 +29,12 @@ build:
|
|||||||
[kotlinc] [TestData]/incorrectKotlinCode.kt:4:1: error: expecting ')'
|
[kotlinc] [TestData]/incorrectKotlinCode.kt:4:1: error: expecting ')'
|
||||||
[kotlinc]
|
[kotlinc]
|
||||||
[kotlinc] ^
|
[kotlinc] ^
|
||||||
|
[kotlinc] [TestData]/incorrectKotlinCode.kt:4:1: error: a type annotation is required on a value parameter
|
||||||
|
[kotlinc]
|
||||||
|
[kotlinc] ^
|
||||||
|
[kotlinc] [TestData]/incorrectKotlinCode.kt:3:1: error: function 'main' must have a body
|
||||||
|
[kotlinc] fun main(
|
||||||
|
[kotlinc] ^
|
||||||
|
|
||||||
BUILD SUCCESSFUL
|
BUILD SUCCESSFUL
|
||||||
Total time: [time]
|
Total time: [time]
|
||||||
|
|||||||
@@ -3,9 +3,13 @@
|
|||||||
|
|
||||||
<target name="build">
|
<target name="build">
|
||||||
<javac srcdir="${test.data}" destdir="${temp}" includeantruntime="false" failonerror="false">
|
<javac srcdir="${test.data}" destdir="${temp}" includeantruntime="false" failonerror="false">
|
||||||
<withKotlin/>
|
<withKotlin>
|
||||||
|
<compilerarg line="-Xuse-fir-lt=false"/>
|
||||||
|
</withKotlin>
|
||||||
</javac>
|
</javac>
|
||||||
|
|
||||||
<kotlinc src="${test.data}" output="${temp}" failonerror="false"/>
|
<kotlinc src="${test.data}" output="${temp}" failonerror="false">
|
||||||
|
<compilerarg line="-Xuse-fir-lt=false"/>
|
||||||
|
</kotlinc>
|
||||||
</target>
|
</target>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||||
|
|
||||||
<target name="build">
|
<target name="build">
|
||||||
<kotlinc src="${test.data}" output="${temp}"/>
|
<kotlinc src="${test.data}" output="${temp}">
|
||||||
|
<compilerarg line="-Xuse-fir-lt=false"/>
|
||||||
|
</kotlinc>
|
||||||
</target>
|
</target>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
<jvmarg value="-Xmx128m"/>
|
<jvmarg value="-Xmx128m"/>
|
||||||
<jvmarg value="-javaagent:${temp}/premain.jar"/>
|
<jvmarg value="-javaagent:${temp}/premain.jar"/>
|
||||||
<compilerarg value="-nowarn"/>
|
<compilerarg value="-nowarn"/>
|
||||||
|
<compilerarg line="-Xuse-fir-lt=false"/>
|
||||||
</kotlinc>
|
</kotlinc>
|
||||||
</target>
|
</target>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -9,6 +9,15 @@ build:
|
|||||||
[kotlinc] Compiling [[TestData]] => [[Temp]/fork.jar]
|
[kotlinc] Compiling [[TestData]] => [[Temp]/fork.jar]
|
||||||
[kotlinc] -Xms64m
|
[kotlinc] -Xms64m
|
||||||
[kotlinc] -Xmx128m
|
[kotlinc] -Xmx128m
|
||||||
|
[kotlinc] warning: ATTENTION!
|
||||||
|
[kotlinc] This build uses unsafe internal compiler arguments:
|
||||||
|
[kotlinc]
|
||||||
|
[kotlinc] -XXLanguage:+EnableDfaWarningsInK2
|
||||||
|
[kotlinc]
|
||||||
|
[kotlinc] This mode is not recommended for production use,
|
||||||
|
[kotlinc] as no stability/compatibility guarantees are given on
|
||||||
|
[kotlinc] compiler or generated code. Use it at your own risk!
|
||||||
|
[kotlinc]
|
||||||
[kotlinc] error: warnings found and -Werror specified
|
[kotlinc] error: warnings found and -Werror specified
|
||||||
[kotlinc] [TestData]/test.kt:4:15: warning: this cast can never succeed
|
[kotlinc] [TestData]/test.kt:4:15: warning: this cast can never succeed
|
||||||
[kotlinc] println(0 as String)
|
[kotlinc] println(0 as String)
|
||||||
|
|||||||
@@ -20,6 +20,8 @@
|
|||||||
<jvmarg value="-Xmx128m"/>
|
<jvmarg value="-Xmx128m"/>
|
||||||
<jvmarg value="-javaagent:${temp}/premain.jar"/>
|
<jvmarg value="-javaagent:${temp}/premain.jar"/>
|
||||||
<compilerarg value="-Werror"/>
|
<compilerarg value="-Werror"/>
|
||||||
|
<compilerarg line="-Xuse-fir-lt=false"/>
|
||||||
|
<compilerarg line="-XXLanguage:+EnableDfaWarningsInK2"/>
|
||||||
</kotlinc>
|
</kotlinc>
|
||||||
</target>
|
</target>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -3,9 +3,6 @@ Buildfile: [TestData]/build.xml
|
|||||||
|
|
||||||
build:
|
build:
|
||||||
[kotlinc] Compiling [[TestData]/hello.kt] => [[Temp]/hello.jar]
|
[kotlinc] Compiling [[TestData]/hello.kt] => [[Temp]/hello.jar]
|
||||||
[kotlinc] [TestData]/hello.kt:15:9: warning: variable 'result' is never used
|
|
||||||
[kotlinc] val result = "$a$c$e$f$j"
|
|
||||||
[kotlinc] ^
|
|
||||||
[java] OK
|
[java] OK
|
||||||
|
|
||||||
BUILD SUCCESSFUL
|
BUILD SUCCESSFUL
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
<target name="build">
|
<target name="build">
|
||||||
<kotlinc output="${temp}/hello.jar">
|
<kotlinc output="${temp}/hello.jar">
|
||||||
<src path="${test.data}"/>
|
<src path="${test.data}"/>
|
||||||
|
<compilerarg line="-Xuse-fir-lt=false"/>
|
||||||
</kotlinc>
|
</kotlinc>
|
||||||
|
|
||||||
<java classname="pkg.AKt" fork="true">
|
<java classname="pkg.AKt" fork="true">
|
||||||
|
|||||||
@@ -4,7 +4,9 @@
|
|||||||
<target name="build">
|
<target name="build">
|
||||||
<mkdir dir="${temp}/classes"/>
|
<mkdir dir="${temp}/classes"/>
|
||||||
<javac srcdir="${test.data}" destdir="${temp}/classes" includeantruntime="false">
|
<javac srcdir="${test.data}" destdir="${temp}/classes" includeantruntime="false">
|
||||||
<withKotlin/>
|
<withKotlin>
|
||||||
|
<compilerarg line="-Xuse-fir-lt=false"/>
|
||||||
|
</withKotlin>
|
||||||
</javac>
|
</javac>
|
||||||
<jar destfile="${temp}/hello.jar">
|
<jar destfile="${temp}/hello.jar">
|
||||||
<fileset dir="${temp}/classes"/>
|
<fileset dir="${temp}/classes"/>
|
||||||
|
|||||||
Vendored
+3
-10
@@ -5,20 +5,13 @@ build:
|
|||||||
[mkdir] Created dir: [Temp]/classes
|
[mkdir] Created dir: [Temp]/classes
|
||||||
[javac] Compiling 2 source files to [Temp]/classes
|
[javac] Compiling 2 source files to [Temp]/classes
|
||||||
[javac] Compiling [[TestData]] => [[Temp]/classes]
|
[javac] Compiling [[TestData]] => [[Temp]/classes]
|
||||||
[javac] [TestData]/literals.kt:6:9: error: overload resolution ambiguity:
|
[javac] [TestData]/literals.kt:9:9: error: overload resolution ambiguity between candidates: [fun intArrayOf(vararg elements: IntArray): IntArray, fun intArrayOf(vararg elements: IntArray): IntArray]
|
||||||
[javac] public fun intArrayOf(vararg elements: Int): IntArray defined in kotlin in file myArrayOf.kt
|
|
||||||
[javac] public fun intArrayOf(vararg elements: Int): IntArray defined in kotlin in file myArrayOf.kt
|
|
||||||
[javac] @AnnInt([1, 2])
|
|
||||||
[javac] ^
|
|
||||||
[javac] [TestData]/literals.kt:9:9: error: overload resolution ambiguity:
|
|
||||||
[javac] public fun intArrayOf(vararg elements: Int): IntArray defined in kotlin in file myArrayOf.kt
|
|
||||||
[javac] public fun intArrayOf(vararg elements: Int): IntArray defined in kotlin in file myArrayOf.kt
|
|
||||||
[javac] @AnnInt(intArrayOf(1, 2))
|
[javac] @AnnInt(intArrayOf(1, 2))
|
||||||
[javac] ^
|
[javac] ^
|
||||||
[javac] [TestData]/myArrayOf.kt:3:1: error: conflicting overloads: public fun intArrayOf(vararg elements: Int): IntArray defined in kotlin in file myArrayOf.kt, public fun intArrayOf(vararg elements: Int): IntArray defined in kotlin in file myArrayOf.kt
|
[javac] [TestData]/myArrayOf.kt:3:1: error: conflicting overloads: [fun intArrayOf(vararg elements: IntArray): IntArray]
|
||||||
[javac] public fun intArrayOf(vararg elements: Int): IntArray = TODO()
|
[javac] public fun intArrayOf(vararg elements: Int): IntArray = TODO()
|
||||||
[javac] ^
|
[javac] ^
|
||||||
[javac] [TestData]/myArrayOf.kt:4:1: error: conflicting overloads: public fun intArrayOf(vararg elements: Int): IntArray defined in kotlin in file myArrayOf.kt, public fun intArrayOf(vararg elements: Int): IntArray defined in kotlin in file myArrayOf.kt
|
[javac] [TestData]/myArrayOf.kt:4:1: error: conflicting overloads: [fun intArrayOf(vararg elements: IntArray): IntArray]
|
||||||
[javac] public fun intArrayOf(vararg elements: Int): IntArray = TODO()
|
[javac] public fun intArrayOf(vararg elements: Int): IntArray = TODO()
|
||||||
[javac] ^
|
[javac] ^
|
||||||
|
|
||||||
|
|||||||
+1
@@ -9,6 +9,7 @@
|
|||||||
</classpath>
|
</classpath>
|
||||||
<withKotlin>
|
<withKotlin>
|
||||||
<compilerarg value="-Xallow-kotlin-package"/>
|
<compilerarg value="-Xallow-kotlin-package"/>
|
||||||
|
<compilerarg line="-Xuse-fir-lt=false"/>
|
||||||
</withKotlin>
|
</withKotlin>
|
||||||
</javac>
|
</javac>
|
||||||
<jar destfile="${temp}/literals.jar">
|
<jar destfile="${temp}/literals.jar">
|
||||||
|
|||||||
-3
@@ -5,9 +5,6 @@ build:
|
|||||||
[mkdir] Created dir: [Temp]/classes
|
[mkdir] Created dir: [Temp]/classes
|
||||||
[javac] Compiling 2 source files to [Temp]/classes
|
[javac] Compiling 2 source files to [Temp]/classes
|
||||||
[javac] Compiling [[TestData]] => [[Temp]/classes]
|
[javac] Compiling [[TestData]] => [[Temp]/classes]
|
||||||
[javac] [TestData]/myArrayOf.kt:3:30: warning: parameter 'elements' is never used
|
|
||||||
[javac] public fun intArrayOf(vararg elements: Int): IntArray = TODO()
|
|
||||||
[javac] ^
|
|
||||||
[javac] Running javac...
|
[javac] Running javac...
|
||||||
[jar] Building jar: [Temp]/literals.jar
|
[jar] Building jar: [Temp]/literals.jar
|
||||||
|
|
||||||
|
|||||||
+1
@@ -9,6 +9,7 @@
|
|||||||
</classpath>
|
</classpath>
|
||||||
<withKotlin>
|
<withKotlin>
|
||||||
<compilerarg value="-Xallow-kotlin-package"/>
|
<compilerarg value="-Xallow-kotlin-package"/>
|
||||||
|
<compilerarg line="-Xuse-fir-lt=false"/>
|
||||||
</withKotlin>
|
</withKotlin>
|
||||||
</javac>
|
</javac>
|
||||||
<jar destfile="${temp}/literals.jar">
|
<jar destfile="${temp}/literals.jar">
|
||||||
|
|||||||
@@ -4,7 +4,9 @@
|
|||||||
<target name="build">
|
<target name="build">
|
||||||
<mkdir dir="${temp}/classes"/>
|
<mkdir dir="${temp}/classes"/>
|
||||||
<javac srcdir="${test.data}" destdir="${temp}/classes" includeantruntime="false">
|
<javac srcdir="${test.data}" destdir="${temp}/classes" includeantruntime="false">
|
||||||
<withKotlin/>
|
<withKotlin>
|
||||||
|
<compilerarg line="-Xuse-fir-lt=false"/>
|
||||||
|
</withKotlin>
|
||||||
</javac>
|
</javac>
|
||||||
<jar destfile="${temp}/hello.jar">
|
<jar destfile="${temp}/hello.jar">
|
||||||
<fileset dir="${temp}/classes"/>
|
<fileset dir="${temp}/classes"/>
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@ build:
|
|||||||
[javac] [TestData]/literals.kt:6:9: error: type mismatch: inferred type is FloatArray but IntArray was expected
|
[javac] [TestData]/literals.kt:6:9: error: type mismatch: inferred type is FloatArray but IntArray was expected
|
||||||
[javac] @AnnInt([1, 2])
|
[javac] @AnnInt([1, 2])
|
||||||
[javac] ^
|
[javac] ^
|
||||||
[javac] [TestData]/literals.kt:9:9: error: type mismatch: inferred type is FloatArray but IntArray was expected
|
[javac] [TestData]/literals.kt:9:9: error: argument type mismatch: actual type is kotlin/FloatArray but kotlin/IntArray was expected
|
||||||
[javac] @AnnInt(intArrayOf(1, 2))
|
[javac] @AnnInt(intArrayOf(1, 2))
|
||||||
[javac] ^
|
[javac] ^
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
</classpath>
|
</classpath>
|
||||||
<withKotlin>
|
<withKotlin>
|
||||||
<compilerarg value="-Xallow-kotlin-package"/>
|
<compilerarg value="-Xallow-kotlin-package"/>
|
||||||
|
<compilerarg line="-Xuse-fir-lt=false"/>
|
||||||
</withKotlin>
|
</withKotlin>
|
||||||
</javac>
|
</javac>
|
||||||
<jar destfile="${temp}/literals.jar">
|
<jar destfile="${temp}/literals.jar">
|
||||||
|
|||||||
Reference in New Issue
Block a user