Fix cli testdata for changed diagnostics in K2

This commit is contained in:
Ilya Chernikov
2023-08-23 12:37:51 +02:00
committed by Space Team
parent 7b49acb490
commit 3dc1b26d83
37 changed files with 64 additions and 61 deletions
@@ -13,10 +13,10 @@ build:
[javac] [TestData]/incorrectKotlinCode.kt:4:1: error: expecting ')'
[javac]
[javac] ^
[javac] [TestData]/incorrectKotlinCode.kt:4:1: error: a type annotation is required on a value parameter
[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] [TestData]/incorrectKotlinCode.kt:3:1: error: function 'main' must have a body.
[javac] fun main(
[javac] ^
[kotlinc] Compiling [[TestData]] => [[Temp]]
@@ -29,10 +29,10 @@ build:
[kotlinc] [TestData]/incorrectKotlinCode.kt:4:1: error: expecting ')'
[kotlinc]
[kotlinc] ^
[kotlinc] [TestData]/incorrectKotlinCode.kt:4:1: error: a type annotation is required on a value parameter
[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] [TestData]/incorrectKotlinCode.kt:3:1: error: function 'main' must have a body.
[kotlinc] fun main(
[kotlinc] ^
@@ -19,7 +19,7 @@ build:
[kotlinc] compiler or generated code. Use it at your own risk!
[kotlinc]
[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] ^
@@ -5,10 +5,10 @@ build:
[mkdir] Created dir: [Temp]/classes
[javac] Compiling 2 source files to [Temp]/classes
[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] [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] [TestData]/literals.kt:9:9: error: argument type mismatch: actual type is 'kotlin/FloatArray' but 'kotlin/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] ^
@@ -1,6 +1,6 @@
ERR:
hello.kt:4:5: error: unresolved reference: a
hello.kt:4:5: error: unresolved reference 'a'.
a
^
@@ -1,5 +1,5 @@
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
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
^
@@ -1,9 +1,9 @@
ERR:
test.kt:4:13: error: classifier 'class System : Any' does not have a companion object, and thus must be initialized here
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
test.kt:4:20: error: syntax error: Expecting an element.
val s = System.in
^