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
@@ -1,8 +1,8 @@
warning: API version 1.4 is deprecated and its support will be removed in a future version of Kotlin
compiler/testData/cli/jvm/apiVersionAndSinceNewerKotlin.kt:1:14: warning: the version is greater than the specified API version 1.4
compiler/testData/cli/jvm/apiVersionAndSinceNewerKotlin.kt:1:14: warning: the version is greater than the specified API version 1.4.
@SinceKotlin("1.5")
^
compiler/testData/cli/jvm/apiVersionAndSinceNewerKotlin.kt:4:14: warning: the version is greater than the specified API version 1.4
compiler/testData/cli/jvm/apiVersionAndSinceNewerKotlin.kt:4:14: warning: the version is greater than the specified API version 1.4.
@SinceKotlin("1.6")
^
OK
+1 -1
View File
@@ -1,4 +1,4 @@
compiler/testData/cli/jvm/compatqualUsage.kt:2:11: error: null can not be a value of a non-null type '@EnhancedNullability kotlin/String'
compiler/testData/cli/jvm/compatqualUsage.kt:2:11: error: null cannot be a value of a non-null type '@EnhancedNullability kotlin/String'.
b.foo(null)
^
COMPILATION_ERROR
+1 -1
View File
@@ -1,4 +1,4 @@
compiler/testData/cli/jvm/compatqualUsage.kt:2:11: error: null can not be a value of a non-null type '@EnhancedNullability kotlin/String'
compiler/testData/cli/jvm/compatqualUsage.kt:2:11: error: null cannot be a value of a non-null type '@EnhancedNullability kotlin/String'.
b.foo(null)
^
COMPILATION_ERROR
+2 -2
View File
@@ -1,7 +1,7 @@
compiler/testData/cli/jvm/javaSrcWrongPackage.kt:1:13: error: unresolved reference: A.Nested
compiler/testData/cli/jvm/javaSrcWrongPackage.kt:1:13: error: unresolved reference 'A'.
fun test(): A.Nested = A().nested()
^
compiler/testData/cli/jvm/javaSrcWrongPackage.kt:1:24: error: unresolved reference: A
compiler/testData/cli/jvm/javaSrcWrongPackage.kt:1:24: error: unresolved reference 'A'.
fun test(): A.Nested = A().nested()
^
COMPILATION_ERROR
+1 -1
View File
@@ -1,4 +1,4 @@
compiler/testData/cli/jvm/jspecifyUsage.kt:2:11: error: null can not be a value of a non-null type '@EnhancedNullability kotlin/String'
compiler/testData/cli/jvm/jspecifyUsage.kt:2:11: error: null cannot be a value of a non-null type '@EnhancedNullability kotlin/String'.
a.foo(null)
^
COMPILATION_ERROR
+1 -1
View File
@@ -1,4 +1,4 @@
compiler/testData/cli/jvm/jspecifyUsage.kt:2:11: error: null can not be a value of a non-null type '@EnhancedNullability kotlin/String'
compiler/testData/cli/jvm/jspecifyUsage.kt:2:11: error: null cannot be a value of a non-null type '@EnhancedNullability kotlin/String'.
a.foo(null)
^
COMPILATION_ERROR
+1 -1
View File
@@ -1,4 +1,4 @@
compiler/testData/cli/jvm/jsr305DefaultMigration.kt:2:19: error: null can not be a value of a non-null type '@EnhancedNullability kotlin/String'
compiler/testData/cli/jvm/jsr305DefaultMigration.kt:2:19: error: null cannot be a value of a non-null type '@EnhancedNullability kotlin/String'.
annotated.foo(null)
^
COMPILATION_ERROR
+1 -1
View File
@@ -1,6 +1,6 @@
warning: argument -Xjsr305-annotations is deprecated. Please use -Xjsr305 instead
warning: option 'enable' for -Xjsr305 flag is deprecated. Please use 'strict' instead
compiler/testData/cli/jvm/jsr305Usage.kt:2:11: error: null can not be a value of a non-null type '@EnhancedNullability kotlin/String'
compiler/testData/cli/jvm/jsr305Usage.kt:2:11: error: null cannot be a value of a non-null type '@EnhancedNullability kotlin/String'.
a.foo(null)
^
COMPILATION_ERROR
+1 -1
View File
@@ -1,4 +1,4 @@
compiler/testData/cli/jvm/jsr305Migration.kt:3:19: error: null can not be a value of a non-null type '@EnhancedNullability kotlin/String'
compiler/testData/cli/jvm/jsr305Migration.kt:3:19: error: null cannot be a value of a non-null type '@EnhancedNullability kotlin/String'.
annotated.bar(null)
^
COMPILATION_ERROR
+2 -2
View File
@@ -1,7 +1,7 @@
compiler/testData/cli/jvm/jsr305Migration.kt:2:19: error: null can not be a value of a non-null type '@EnhancedNullability kotlin/String'
compiler/testData/cli/jvm/jsr305Migration.kt:2:19: error: null cannot be a value of a non-null type '@EnhancedNullability kotlin/String'.
annotated.foo(null)
^
compiler/testData/cli/jvm/jsr305Migration.kt:3:19: error: null can not be a value of a non-null type '@EnhancedNullability kotlin/String'
compiler/testData/cli/jvm/jsr305Migration.kt:3:19: error: null cannot be a value of a non-null type '@EnhancedNullability kotlin/String'.
annotated.bar(null)
^
COMPILATION_ERROR
+1 -1
View File
@@ -1,4 +1,4 @@
compiler/testData/cli/jvm/jsr305Migration.kt:3:19: error: null can not be a value of a non-null type '@EnhancedNullability kotlin/String'
compiler/testData/cli/jvm/jsr305Migration.kt:3:19: error: null cannot be a value of a non-null type '@EnhancedNullability kotlin/String'.
annotated.bar(null)
^
COMPILATION_ERROR
+1 -1
View File
@@ -1,4 +1,4 @@
compiler/testData/cli/jvm/jsr305Usage.kt:2:11: error: null can not be a value of a non-null type '@EnhancedNullability kotlin/String'
compiler/testData/cli/jvm/jsr305Usage.kt:2:11: error: null cannot be a value of a non-null type '@EnhancedNullability kotlin/String'.
a.foo(null)
^
COMPILATION_ERROR
+1 -1
View File
@@ -1,7 +1,7 @@
warning: unable to find kotlin-stdlib.jar in the Kotlin home directory. Pass either '-no-stdlib' to prevent adding it to the classpath, or the correct '-kotlin-home'
warning: unable to find kotlin-script-runtime.jar in the Kotlin home directory. Pass either '-no-stdlib' to prevent adding it to the classpath, or the correct '-kotlin-home'
warning: unable to find kotlin-reflect.jar in the Kotlin home directory. Pass either '-no-reflect' or '-no-stdlib' to prevent adding it to the classpath, or the correct '-kotlin-home'
compiler/testData/cli/jvm/simple.kt:1:14: error: unresolved reference: println
compiler/testData/cli/jvm/simple.kt:1:14: error: unresolved reference 'println'.
fun main() = println("hello world")
^
COMPILATION_ERROR
+4 -4
View File
@@ -1,13 +1,13 @@
compiler/testData/cli/jvm/kt19628_progressive.kt:5:29: error: unresolved reference: CollapsedStringAdapter
compiler/testData/cli/jvm/kt19628_progressive.kt:5:29: error: unresolved reference 'CollapsedStringAdapter'.
@get:XmlJavaTypeAdapter(CollapsedStringAdapter::class)
^
compiler/testData/cli/jvm/kt19628_progressive.kt:5:29: error: an annotation argument must be a compile-time constant
compiler/testData/cli/jvm/kt19628_progressive.kt:5:29: error: annotation argument must be a compile-time constant.
@get:XmlJavaTypeAdapter(CollapsedStringAdapter::class)
^
compiler/testData/cli/jvm/kt19628_progressive.kt:8:29: error: unresolved reference: CollapsedStringAdapter
compiler/testData/cli/jvm/kt19628_progressive.kt:8:29: error: unresolved reference 'CollapsedStringAdapter'.
@get:XmlJavaTypeAdapter(CollapsedStringAdapter::class)
^
compiler/testData/cli/jvm/kt19628_progressive.kt:8:29: error: an annotation argument must be a compile-time constant
compiler/testData/cli/jvm/kt19628_progressive.kt:8:29: error: annotation argument must be a compile-time constant.
@get:XmlJavaTypeAdapter(CollapsedStringAdapter::class)
^
COMPILATION_ERROR
@@ -1,16 +1,16 @@
compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.kt:6:5: error: modifier 'override' is incompatible with 'private'
compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.kt:6:5: error: modifier 'override' is incompatible with 'private'.
override protected private val c: Int
^
compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.kt:6:14: error: cannot weaken access privilege 'private' for 'accessor' in 'A'
compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.kt:6:14: error: cannot weaken access privilege private for 'accessor' in 'A'.
override protected private val c: Int
^
compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.kt:6:14: error: abstract property in an interface cannot be private
compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.kt:6:14: error: abstract property in interface cannot be private.
override protected private val c: Int
^
compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.kt:6:14: error: modifier 'protected' is not applicable inside 'interface'
compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.kt:6:14: error: modifier 'protected' is not applicable inside 'interface'.
override protected private val c: Int
^
compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.kt:6:24: error: modifier 'private' is incompatible with 'override'
compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.kt:6:24: error: modifier 'private' is incompatible with 'override'.
override protected private val c: Int
^
COMPILATION_ERROR
+1 -1
View File
@@ -1,4 +1,4 @@
compiler/testData/cli/jvm/noReflect.kt:4:19: error: unresolved reference: primaryConstructor
compiler/testData/cli/jvm/noReflect.kt:4:19: error: unresolved reference 'primaryConstructor'.
String::class.primaryConstructor
^
COMPILATION_ERROR
+2 -2
View File
@@ -1,7 +1,7 @@
compiler/testData/cli/jvm/noStdlib.kt:4:19: error: unresolved reference: primaryConstructor
compiler/testData/cli/jvm/noStdlib.kt:4:19: error: unresolved reference 'primaryConstructor'.
String::class.primaryConstructor
^
compiler/testData/cli/jvm/noStdlib.kt:7:5: error: unresolved reference: listOf
compiler/testData/cli/jvm/noStdlib.kt:7:5: error: unresolved reference 'listOf'.
listOf(42)
^
COMPILATION_ERROR
+1 -1
View File
@@ -1,4 +1,4 @@
compiler/testData/cli/jvm/severalAnnotations.kt:2:11: error: null can not be a value of a non-null type '@EnhancedNullability kotlin/String'
compiler/testData/cli/jvm/severalAnnotations.kt:2:11: error: null cannot be a value of a non-null type '@EnhancedNullability kotlin/String'.
a.foo(null)
^
COMPILATION_ERROR
+2 -2
View File
@@ -1,7 +1,7 @@
compiler/testData/cli/jvm/progressive/tailrecOnVirtualMember.kt:2:5: error: tailrec is not allowed on open members
compiler/testData/cli/jvm/progressive/tailrecOnVirtualMember.kt:2:5: error: tailrec is prohibited on open members.
tailrec open fun foo(x: Int) {}
^
compiler/testData/cli/jvm/progressive/typeParametersInAnonymousObjects.kt:2:19: error: type parameters are not allowed for objects
compiler/testData/cli/jvm/progressive/typeParametersInAnonymousObjects.kt:2:19: error: type parameters are prohibited for objects.
val x = object<T> { }
^
COMPILATION_ERROR
@@ -1,4 +1,4 @@
compiler/testData/cli/jvm/readingConfigFromEnvironment/simple.kt:2:15: error: [NONE_APPLICABLE] None of the following functions are applicable: [@IntrinsicConstEvaluation() fun plus(other: Int): Int, @IntrinsicConstEvaluation() fun plus(other: Byte): Int, @IntrinsicConstEvaluation() fun plus(other: Double): Double, ...]
compiler/testData/cli/jvm/readingConfigFromEnvironment/simple.kt:2:15: error: [NONE_APPLICABLE] None of the following functions is applicable: [@IntrinsicConstEvaluation() fun plus(other: Int): Int, @IntrinsicConstEvaluation() fun plus(other: Byte): Int, @IntrinsicConstEvaluation() fun plus(other: Double): Double, ...]
val x = 1 + ""
^
COMPILATION_ERROR
+1 -1
View File
@@ -1,4 +1,4 @@
compiler/testData/cli/jvm/recordAsSingleFileRoot.kt:5:14: error: unresolved reference: Unresolved
compiler/testData/cli/jvm/recordAsSingleFileRoot.kt:5:14: error: unresolved reference 'Unresolved'.
fun error(): Unresolved? = null
^
COMPILATION_ERROR
@@ -1,7 +1,7 @@
compiler/testData/cli/jvm/reportInternalDiagnosticNames.kt:2:21: error: [INITIALIZER_TYPE_MISMATCH] Initializer type mismatch: expected 'kotlin/String', actual 'kotlin/Int'
compiler/testData/cli/jvm/reportInternalDiagnosticNames.kt:2:21: error: [INITIALIZER_TYPE_MISMATCH] Initializer type mismatch: expected 'kotlin/String', actual 'kotlin/Int'.
val x: String = 1
^
compiler/testData/cli/jvm/reportInternalDiagnosticNames.kt:3:1: error: [NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY] A 'return' expression is required in a function with a block body ('{...}')
compiler/testData/cli/jvm/reportInternalDiagnosticNames.kt:3:1: error: [NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY] A 'return' expression is required in a function with a block body ('{...}').
}
^
COMPILATION_ERROR
+1 -1
View File
@@ -1,4 +1,4 @@
compiler/testData/cli/jvm/returnAsWhenKey.kt:4:5: error: 'when' expression must be exhaustive, add necessary 'true', 'false' branches or 'else' branch instead
compiler/testData/cli/jvm/returnAsWhenKey.kt:4:5: error: 'when' expression must be exhaustive. Add the necessary 'true', 'false' branches or 'else' branch instead
when (true) {
^
COMPILATION_ERROR
+6 -3
View File
@@ -1,10 +1,13 @@
compiler/testData/cli/jvm/singleJavaFileRoots/test.kt:8:5: error: unresolved reference: C
compiler/testData/cli/jvm/singleJavaFileRoots/test.kt:7:9: error: cannot access class 'C!'. Check your module classpath for missing or conflicting dependencies.
B().c()
^
compiler/testData/cli/jvm/singleJavaFileRoots/test.kt:8:5: error: unresolved reference 'C'.
C().a()
^
compiler/testData/cli/jvm/singleJavaFileRoots/test.kt:12:5: error: cannot access 'constructor(): PackageLocal1': it is package-private in 'lib/ext/PackageLocal1'
compiler/testData/cli/jvm/singleJavaFileRoots/test.kt:12:5: error: cannot access 'constructor(): PackageLocal1': it is package-private in 'lib/ext/PackageLocal1'.
PackageLocal1()
^
compiler/testData/cli/jvm/singleJavaFileRoots/test.kt:13:5: error: cannot access 'constructor(): PackageLocal2': it is package-private in 'lib/ext/PackageLocal2'
compiler/testData/cli/jvm/singleJavaFileRoots/test.kt:13:5: error: cannot access 'constructor(): PackageLocal2': it is package-private in 'lib/ext/PackageLocal2'.
PackageLocal2()
^
COMPILATION_ERROR
+2 -2
View File
@@ -1,7 +1,7 @@
compiler/testData/cli/jvm/suspensionPointInMonitor.kt:26:13: error: the 'suspend fun suspensionPoint(): Unit' suspension point is inside a critical section
compiler/testData/cli/jvm/suspensionPointInMonitor.kt:26:13: error: the 'suspend fun suspensionPoint(): Unit' suspension point is inside a critical section.
suspensionPoint()
^
compiler/testData/cli/jvm/suspensionPointInMonitor.kt:60:17: error: the 'suspend fun suspensionPoint(): Unit' suspension point is inside a critical section
compiler/testData/cli/jvm/suspensionPointInMonitor.kt:60:17: error: the 'suspend fun suspensionPoint(): Unit' suspension point is inside a critical section.
suspensionPoint()
^
COMPILATION_ERROR
+1 -1
View File
@@ -8,7 +8,7 @@ as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk!
error: warnings found and -Werror specified
compiler/testData/cli/jvm/werror.kt:2:6: warning: unnecessary non-null assertion (!!) on a non-null receiver of type 'kotlin/String'
compiler/testData/cli/jvm/werror.kt:2:6: warning: unnecessary non-null assertion (!!) on a non-null receiver of type 'kotlin/String'.
s!!
^
COMPILATION_ERROR
+1 -1
View File
@@ -8,7 +8,7 @@ as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk!
error: warnings found and -Werror specified
compiler/testData/cli/jvm/werrorWithNoWarn.kt:2:6: warning: unnecessary non-null assertion (!!) on a non-null receiver of type 'kotlin/String'
compiler/testData/cli/jvm/werrorWithNoWarn.kt:2:6: warning: unnecessary non-null assertion (!!) on a non-null receiver of type 'kotlin/String'.
s!!
^
COMPILATION_ERROR
+1 -1
View File
@@ -4,7 +4,7 @@ compiler/testData/cli/jvm/wrongAbiVersion.kt:3:12: error: class 'ClassWithWrongA
The class is loaded from $TESTDATA_DIR$/wrongAbiVersionLib/bin/ClassWithWrongAbiVersion.class
fun foo(x: ClassWithWrongAbiVersion) {
^
compiler/testData/cli/jvm/wrongAbiVersion.kt:4:5: error: unresolved reference: bar
compiler/testData/cli/jvm/wrongAbiVersion.kt:4:5: error: unresolved reference 'bar'.
bar()
^
compiler/testData/cli/jvm/wrongAbiVersion.kt:6:7: error: unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
@@ -1,10 +1,10 @@
compiler/testData/cli/jvm/wrongAnnotationArgumentInCtor.kt:4:32: error: too many arguments for public constructor(): Anno
compiler/testData/cli/jvm/wrongAnnotationArgumentInCtor.kt:4:32: error: too many arguments for 'public constructor(): Anno'.
class UnresolvedArgument(@Anno(BLA) val s: Int)
^
compiler/testData/cli/jvm/wrongAnnotationArgumentInCtor.kt:4:32: error: unresolved reference: BLA
compiler/testData/cli/jvm/wrongAnnotationArgumentInCtor.kt:4:32: error: unresolved reference 'BLA'.
class UnresolvedArgument(@Anno(BLA) val s: Int)
^
compiler/testData/cli/jvm/wrongAnnotationArgumentInCtor.kt:6:24: error: no value passed for parameter 'message'
compiler/testData/cli/jvm/wrongAnnotationArgumentInCtor.kt:6:24: error: no value passed for parameter 'message'.
class WithoutArguments(@Deprecated val s: Int)
^
COMPILATION_ERROR
@@ -1,4 +1,4 @@
compiler/testData/cli/metadata/inheritorOfExpectSealedClass/common-2.kt:1:21: error: actual class Base : Any has no corresponding expected declaration
compiler/testData/cli/metadata/inheritorOfExpectSealedClass/common-2.kt:1:21: error: 'actual class Base : Any' has no corresponding expected declaration
actual sealed class Base
^
COMPILATION_ERROR