[K1, K2, CLI] Mark whole position range of compiler diagnostics in CLI

#KT-64989
This commit is contained in:
Evgeniy.Zhelenskiy
2024-01-15 21:36:56 +01:00
committed by Space Team
parent 5b11308d1b
commit 7eab4b672d
278 changed files with 929 additions and 907 deletions
@@ -5,36 +5,36 @@ build:
[javac] Compiling 2 source files to [Temp]
[javac] Compiling [[TestData]] => [[Temp]]
[javac] [TestData]/incorrectKotlinCode.kt:4:1: error: parameter name expected
[javac]
[javac]
[javac] ^
[javac] [TestData]/incorrectKotlinCode.kt:4:1: error: expecting comma or ')'
[javac]
[javac]
[javac] ^
[javac] [TestData]/incorrectKotlinCode.kt:4:1: error: expecting ')'
[javac]
[javac]
[javac] ^
[javac] [TestData]/incorrectKotlinCode.kt:4:1: error: a type annotation is required on a value parameter.
[javac]
[javac]
[javac] ^
[javac] [TestData]/incorrectKotlinCode.kt:3:1: error: function 'main' must have a body.
[javac] fun main(
[javac] ^
[javac] ^^^^^^^^^
[kotlinc] Compiling [[TestData]] => [[Temp]]
[kotlinc] [TestData]/incorrectKotlinCode.kt:4:1: error: parameter name expected
[kotlinc]
[kotlinc]
[kotlinc] ^
[kotlinc] [TestData]/incorrectKotlinCode.kt:4:1: error: expecting comma or ')'
[kotlinc]
[kotlinc]
[kotlinc] ^
[kotlinc] [TestData]/incorrectKotlinCode.kt:4:1: error: expecting ')'
[kotlinc]
[kotlinc]
[kotlinc] ^
[kotlinc] [TestData]/incorrectKotlinCode.kt:4:1: error: a type annotation is required on a value parameter.
[kotlinc]
[kotlinc]
[kotlinc] ^
[kotlinc] [TestData]/incorrectKotlinCode.kt:3:1: error: function 'main' must have a body.
[kotlinc] fun main(
[kotlinc] ^
[kotlinc] ^^^^^^^^^
BUILD SUCCESSFUL
Total time: [time]
@@ -5,7 +5,7 @@ build:
[kotlinc] Compiling [[TestData]] => [[Temp]]
[kotlinc] [TestData]/incorrectKotlinCode.kt:1:1: error: expecting a top level declaration
[kotlinc] xxxx
[kotlinc] ^
[kotlinc] ^^^^
ERR:
@@ -11,17 +11,17 @@ build:
[kotlinc] -Xmx128m
[kotlinc] warning: ATTENTION!
[kotlinc] This build uses unsafe internal compiler arguments:
[kotlinc]
[kotlinc]
[kotlinc] -XXLanguage:+EnableDfaWarningsInK2
[kotlinc]
[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]
[kotlinc] error: warnings found and -Werror specified
[kotlinc] [TestData]/test.kt:4:15: warning: this cast can never succeed.
[kotlinc] println(0 as String)
[kotlinc] ^
[kotlinc] ^^
ERR:
@@ -6,7 +6,7 @@ build:
[kotlinc] warning: language version 1.5 is deprecated and its support will be removed in a future version of Kotlin
[kotlinc] [TestData]/main.kt:1:15: error: suspend function type is allowed as a supertype only since version 1.6
[kotlinc] interface A : suspend () -> Unit
[kotlinc] ^
[kotlinc] ^^^^^^^^^^^^^^^^^^
ERR:
@@ -7,13 +7,13 @@ build:
[javac] Compiling [[TestData]] => [[Temp]/classes]
[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] @AnnInt(intArrayOf(1, 2))
[javac] ^
[javac] ^^^^^^^^^^
[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] ^
[javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[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] ^
[javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERR:
@@ -7,7 +7,7 @@ build:
[javac] Compiling [[TestData]] => [[Temp]/classes]
[javac] [TestData]/literals.kt:5:11: warning: this code uses error suppression for 'UNSUPPORTED_FEATURE'. While it might compile and work, the compiler behavior is UNSPECIFIED and WON'T BE PRESERVED. Please report your use case to the Kotlin issue tracker instead: https://kotl.in/issue
[javac] @Suppress("UNSUPPORTED_FEATURE")
[javac] ^
[javac] ^^^^^^^^^^^^^^^^^^^^^
[javac] Running javac...
[jar] Building jar: [Temp]/literals.jar
@@ -7,10 +7,10 @@ build:
[javac] Compiling [[TestData]] => [[Temp]/classes]
[javac] [TestData]/literals.kt:6:9: error: argument type mismatch: actual type is 'kotlin.FloatArray', but 'kotlin.IntArray' was expected.
[javac] @AnnInt([1, 2])
[javac] ^
[javac] ^^^^^^
[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] ^
[javac] ^^^^^^^^^^^^^^^^
ERR:
@@ -1,6 +1,7 @@
ERR:
noReflect.kt:5:23: warning: call uses reflection API which is not found in compilation classpath. Make sure you have kotlin-reflect.jar in the classpath.
String::class.annotations
^
^^^^^^^^^^^
Return code: 0
@@ -2,9 +2,9 @@
ERR:
test.kt:4:13: error: classifier 'class System : Any' does not have a companion object, so it cannot be used as an expression.
val s = System.in
^
^^^^^^
test.kt:4:20: error: syntax error: Expecting an element.
val s = System.in
^
^^
Return code: 1