From 3dc1b26d83f3d2b4622145151a2ec7a776b02b6d Mon Sep 17 00:00:00 2001 From: Ilya Chernikov Date: Wed, 23 Aug 2023 12:37:51 +0200 Subject: [PATCH] Fix cli testdata for changed diagnostics in K2 --- .../testData/cli/jvm/apiVersionAndSinceNewerKotlin.out | 4 ++-- compiler/testData/cli/jvm/compatqualDefault.out | 2 +- compiler/testData/cli/jvm/compatqualEnable.out | 2 +- compiler/testData/cli/jvm/javaSrcWrongPackage.out | 4 ++-- compiler/testData/cli/jvm/jspecifyDefault.out | 2 +- compiler/testData/cli/jvm/jspecifyStrict.out | 2 +- compiler/testData/cli/jvm/jsr305DefaultMigration.out | 2 +- compiler/testData/cli/jvm/jsr305DeprecatedEnable.out | 2 +- compiler/testData/cli/jvm/jsr305FqNameIgnore.out | 2 +- compiler/testData/cli/jvm/jsr305FqNameStrict.out | 4 ++-- compiler/testData/cli/jvm/jsr305MigrationDefault.out | 2 +- compiler/testData/cli/jvm/jsr305Strict.out | 2 +- compiler/testData/cli/jvm/kotlinHomeWithoutStdlib.out | 2 +- compiler/testData/cli/jvm/kt19628_progressive.out | 8 ++++---- .../cli/jvm/multipleTextRangesInDiagnosticsOrder.out | 10 +++++----- compiler/testData/cli/jvm/noReflect.out | 2 +- compiler/testData/cli/jvm/noStdlib.out | 4 ++-- compiler/testData/cli/jvm/nullabilityAnnotations.out | 2 +- compiler/testData/cli/jvm/progressiveModeOn.out | 4 ++-- .../cli/jvm/readingConfigFromEnvironment/simple.out | 2 +- compiler/testData/cli/jvm/recordAsSingleFileRoot.out | 2 +- .../testData/cli/jvm/reportInternalDiagnosticNames.out | 4 ++-- compiler/testData/cli/jvm/returnAsWhenKey.out | 2 +- compiler/testData/cli/jvm/singleJavaFileRoots.out | 9 ++++++--- compiler/testData/cli/jvm/suspensionPointInMonitor.out | 4 ++-- compiler/testData/cli/jvm/werror.out | 2 +- compiler/testData/cli/jvm/werrorWithNoWarn.out | 2 +- compiler/testData/cli/jvm/wrongAbiVersion.out | 2 +- .../testData/cli/jvm/wrongAnnotationArgumentInCtor.out | 6 +++--- .../cli/metadata/inheritorOfExpectSealedClass.out | 2 +- .../ant/jvm/doNotFailOnError/build.log.expected | 8 ++++---- .../integration/ant/jvm/forkOnError/build.log.expected | 2 +- .../wrongCallForCollectionLiteral/build.log.expected | 4 ++-- .../smoke/compilationFailed/hello.compile.expected | 2 +- .../smoke/noReflect/noReflect.compile.expected | 2 +- .../smoke/syntaxErrors/test.compile.expected | 4 ++-- .../org/jetbrains/kotlin/cli/LauncherScriptTest.kt | 4 ++-- 37 files changed, 64 insertions(+), 61 deletions(-) diff --git a/compiler/testData/cli/jvm/apiVersionAndSinceNewerKotlin.out b/compiler/testData/cli/jvm/apiVersionAndSinceNewerKotlin.out index b7b2a230c28..e127790db59 100644 --- a/compiler/testData/cli/jvm/apiVersionAndSinceNewerKotlin.out +++ b/compiler/testData/cli/jvm/apiVersionAndSinceNewerKotlin.out @@ -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 diff --git a/compiler/testData/cli/jvm/compatqualDefault.out b/compiler/testData/cli/jvm/compatqualDefault.out index c89d9db971d..a4944f42a19 100644 --- a/compiler/testData/cli/jvm/compatqualDefault.out +++ b/compiler/testData/cli/jvm/compatqualDefault.out @@ -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 diff --git a/compiler/testData/cli/jvm/compatqualEnable.out b/compiler/testData/cli/jvm/compatqualEnable.out index c89d9db971d..a4944f42a19 100644 --- a/compiler/testData/cli/jvm/compatqualEnable.out +++ b/compiler/testData/cli/jvm/compatqualEnable.out @@ -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 diff --git a/compiler/testData/cli/jvm/javaSrcWrongPackage.out b/compiler/testData/cli/jvm/javaSrcWrongPackage.out index 12f1051b67b..0da52564db5 100644 --- a/compiler/testData/cli/jvm/javaSrcWrongPackage.out +++ b/compiler/testData/cli/jvm/javaSrcWrongPackage.out @@ -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 \ No newline at end of file diff --git a/compiler/testData/cli/jvm/jspecifyDefault.out b/compiler/testData/cli/jvm/jspecifyDefault.out index 9f5010c4ab7..e7dd0b92044 100644 --- a/compiler/testData/cli/jvm/jspecifyDefault.out +++ b/compiler/testData/cli/jvm/jspecifyDefault.out @@ -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 diff --git a/compiler/testData/cli/jvm/jspecifyStrict.out b/compiler/testData/cli/jvm/jspecifyStrict.out index 9f5010c4ab7..e7dd0b92044 100644 --- a/compiler/testData/cli/jvm/jspecifyStrict.out +++ b/compiler/testData/cli/jvm/jspecifyStrict.out @@ -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 diff --git a/compiler/testData/cli/jvm/jsr305DefaultMigration.out b/compiler/testData/cli/jvm/jsr305DefaultMigration.out index bf1f828f73d..5a66a87b6aa 100644 --- a/compiler/testData/cli/jvm/jsr305DefaultMigration.out +++ b/compiler/testData/cli/jvm/jsr305DefaultMigration.out @@ -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 diff --git a/compiler/testData/cli/jvm/jsr305DeprecatedEnable.out b/compiler/testData/cli/jvm/jsr305DeprecatedEnable.out index dbc7b85103a..e159cb11426 100644 --- a/compiler/testData/cli/jvm/jsr305DeprecatedEnable.out +++ b/compiler/testData/cli/jvm/jsr305DeprecatedEnable.out @@ -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 diff --git a/compiler/testData/cli/jvm/jsr305FqNameIgnore.out b/compiler/testData/cli/jvm/jsr305FqNameIgnore.out index 9bd4aa61487..32a79f84a7e 100644 --- a/compiler/testData/cli/jvm/jsr305FqNameIgnore.out +++ b/compiler/testData/cli/jvm/jsr305FqNameIgnore.out @@ -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 diff --git a/compiler/testData/cli/jvm/jsr305FqNameStrict.out b/compiler/testData/cli/jvm/jsr305FqNameStrict.out index 7107d62d998..c6af36a74db 100644 --- a/compiler/testData/cli/jvm/jsr305FqNameStrict.out +++ b/compiler/testData/cli/jvm/jsr305FqNameStrict.out @@ -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 diff --git a/compiler/testData/cli/jvm/jsr305MigrationDefault.out b/compiler/testData/cli/jvm/jsr305MigrationDefault.out index 9bd4aa61487..32a79f84a7e 100644 --- a/compiler/testData/cli/jvm/jsr305MigrationDefault.out +++ b/compiler/testData/cli/jvm/jsr305MigrationDefault.out @@ -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 diff --git a/compiler/testData/cli/jvm/jsr305Strict.out b/compiler/testData/cli/jvm/jsr305Strict.out index bcae60e7b5b..82b600502de 100644 --- a/compiler/testData/cli/jvm/jsr305Strict.out +++ b/compiler/testData/cli/jvm/jsr305Strict.out @@ -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 diff --git a/compiler/testData/cli/jvm/kotlinHomeWithoutStdlib.out b/compiler/testData/cli/jvm/kotlinHomeWithoutStdlib.out index e5685cfb624..92d4bf86b01 100644 --- a/compiler/testData/cli/jvm/kotlinHomeWithoutStdlib.out +++ b/compiler/testData/cli/jvm/kotlinHomeWithoutStdlib.out @@ -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 diff --git a/compiler/testData/cli/jvm/kt19628_progressive.out b/compiler/testData/cli/jvm/kt19628_progressive.out index 405e99446ab..239910e2086 100644 --- a/compiler/testData/cli/jvm/kt19628_progressive.out +++ b/compiler/testData/cli/jvm/kt19628_progressive.out @@ -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 diff --git a/compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.out b/compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.out index 1963c813fbe..3da690d5a2a 100644 --- a/compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.out +++ b/compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.out @@ -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 diff --git a/compiler/testData/cli/jvm/noReflect.out b/compiler/testData/cli/jvm/noReflect.out index c5e48a87981..20d1c6adcf0 100644 --- a/compiler/testData/cli/jvm/noReflect.out +++ b/compiler/testData/cli/jvm/noReflect.out @@ -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 diff --git a/compiler/testData/cli/jvm/noStdlib.out b/compiler/testData/cli/jvm/noStdlib.out index 7dc434df236..ca6b1d7c867 100644 --- a/compiler/testData/cli/jvm/noStdlib.out +++ b/compiler/testData/cli/jvm/noStdlib.out @@ -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 diff --git a/compiler/testData/cli/jvm/nullabilityAnnotations.out b/compiler/testData/cli/jvm/nullabilityAnnotations.out index e84a751c20b..bfcbeb0a4d9 100644 --- a/compiler/testData/cli/jvm/nullabilityAnnotations.out +++ b/compiler/testData/cli/jvm/nullabilityAnnotations.out @@ -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 diff --git a/compiler/testData/cli/jvm/progressiveModeOn.out b/compiler/testData/cli/jvm/progressiveModeOn.out index e02fa0abd5a..0870436a0fb 100644 --- a/compiler/testData/cli/jvm/progressiveModeOn.out +++ b/compiler/testData/cli/jvm/progressiveModeOn.out @@ -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 { } ^ COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/readingConfigFromEnvironment/simple.out b/compiler/testData/cli/jvm/readingConfigFromEnvironment/simple.out index e6421f9ed33..57015852ee6 100644 --- a/compiler/testData/cli/jvm/readingConfigFromEnvironment/simple.out +++ b/compiler/testData/cli/jvm/readingConfigFromEnvironment/simple.out @@ -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 diff --git a/compiler/testData/cli/jvm/recordAsSingleFileRoot.out b/compiler/testData/cli/jvm/recordAsSingleFileRoot.out index d024c3b914e..ff51700296c 100644 --- a/compiler/testData/cli/jvm/recordAsSingleFileRoot.out +++ b/compiler/testData/cli/jvm/recordAsSingleFileRoot.out @@ -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 diff --git a/compiler/testData/cli/jvm/reportInternalDiagnosticNames.out b/compiler/testData/cli/jvm/reportInternalDiagnosticNames.out index 3b16ccbc425..ce89998f00f 100644 --- a/compiler/testData/cli/jvm/reportInternalDiagnosticNames.out +++ b/compiler/testData/cli/jvm/reportInternalDiagnosticNames.out @@ -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 diff --git a/compiler/testData/cli/jvm/returnAsWhenKey.out b/compiler/testData/cli/jvm/returnAsWhenKey.out index c61a4f2d5fc..74881c39cb2 100644 --- a/compiler/testData/cli/jvm/returnAsWhenKey.out +++ b/compiler/testData/cli/jvm/returnAsWhenKey.out @@ -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 diff --git a/compiler/testData/cli/jvm/singleJavaFileRoots.out b/compiler/testData/cli/jvm/singleJavaFileRoots.out index 4a6d1c282ce..114a79bf325 100644 --- a/compiler/testData/cli/jvm/singleJavaFileRoots.out +++ b/compiler/testData/cli/jvm/singleJavaFileRoots.out @@ -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 diff --git a/compiler/testData/cli/jvm/suspensionPointInMonitor.out b/compiler/testData/cli/jvm/suspensionPointInMonitor.out index 41e76c7cfd1..7192ef0de0d 100644 --- a/compiler/testData/cli/jvm/suspensionPointInMonitor.out +++ b/compiler/testData/cli/jvm/suspensionPointInMonitor.out @@ -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 diff --git a/compiler/testData/cli/jvm/werror.out b/compiler/testData/cli/jvm/werror.out index d1ccfb23246..cdc5faeecaf 100644 --- a/compiler/testData/cli/jvm/werror.out +++ b/compiler/testData/cli/jvm/werror.out @@ -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 diff --git a/compiler/testData/cli/jvm/werrorWithNoWarn.out b/compiler/testData/cli/jvm/werrorWithNoWarn.out index f0c11157d05..348914a685d 100644 --- a/compiler/testData/cli/jvm/werrorWithNoWarn.out +++ b/compiler/testData/cli/jvm/werrorWithNoWarn.out @@ -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 diff --git a/compiler/testData/cli/jvm/wrongAbiVersion.out b/compiler/testData/cli/jvm/wrongAbiVersion.out index 1f595d07b4c..224f546b626 100644 --- a/compiler/testData/cli/jvm/wrongAbiVersion.out +++ b/compiler/testData/cli/jvm/wrongAbiVersion.out @@ -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: diff --git a/compiler/testData/cli/jvm/wrongAnnotationArgumentInCtor.out b/compiler/testData/cli/jvm/wrongAnnotationArgumentInCtor.out index ad61fbe0b03..627f99c0e69 100644 --- a/compiler/testData/cli/jvm/wrongAnnotationArgumentInCtor.out +++ b/compiler/testData/cli/jvm/wrongAnnotationArgumentInCtor.out @@ -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 diff --git a/compiler/testData/cli/metadata/inheritorOfExpectSealedClass.out b/compiler/testData/cli/metadata/inheritorOfExpectSealedClass.out index 6265a73e798..c086a087a40 100644 --- a/compiler/testData/cli/metadata/inheritorOfExpectSealedClass.out +++ b/compiler/testData/cli/metadata/inheritorOfExpectSealedClass.out @@ -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 diff --git a/compiler/testData/integration/ant/jvm/doNotFailOnError/build.log.expected b/compiler/testData/integration/ant/jvm/doNotFailOnError/build.log.expected index 2d5c9b71d03..7e2f6f2f7c7 100644 --- a/compiler/testData/integration/ant/jvm/doNotFailOnError/build.log.expected +++ b/compiler/testData/integration/ant/jvm/doNotFailOnError/build.log.expected @@ -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] ^ diff --git a/compiler/testData/integration/ant/jvm/forkOnError/build.log.expected b/compiler/testData/integration/ant/jvm/forkOnError/build.log.expected index 7e792863f17..7d722c1a4c6 100644 --- a/compiler/testData/integration/ant/jvm/forkOnError/build.log.expected +++ b/compiler/testData/integration/ant/jvm/forkOnError/build.log.expected @@ -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] ^ diff --git a/compiler/testData/integration/ant/jvm/wrongCallForCollectionLiteral/build.log.expected b/compiler/testData/integration/ant/jvm/wrongCallForCollectionLiteral/build.log.expected index 8d374f265a4..5089b9c26e8 100644 --- a/compiler/testData/integration/ant/jvm/wrongCallForCollectionLiteral/build.log.expected +++ b/compiler/testData/integration/ant/jvm/wrongCallForCollectionLiteral/build.log.expected @@ -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] ^ diff --git a/compiler/testData/integration/smoke/compilationFailed/hello.compile.expected b/compiler/testData/integration/smoke/compilationFailed/hello.compile.expected index 251109a8756..dc795953d36 100644 --- a/compiler/testData/integration/smoke/compilationFailed/hello.compile.expected +++ b/compiler/testData/integration/smoke/compilationFailed/hello.compile.expected @@ -1,6 +1,6 @@ ERR: -hello.kt:4:5: error: unresolved reference: a +hello.kt:4:5: error: unresolved reference 'a'. a ^ diff --git a/compiler/testData/integration/smoke/noReflect/noReflect.compile.expected b/compiler/testData/integration/smoke/noReflect/noReflect.compile.expected index 43f7acbc168..9a336b339da 100644 --- a/compiler/testData/integration/smoke/noReflect/noReflect.compile.expected +++ b/compiler/testData/integration/smoke/noReflect/noReflect.compile.expected @@ -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 ^ diff --git a/compiler/testData/integration/smoke/syntaxErrors/test.compile.expected b/compiler/testData/integration/smoke/syntaxErrors/test.compile.expected index 7ebddd55eeb..d3770b56d63 100644 --- a/compiler/testData/integration/smoke/syntaxErrors/test.compile.expected +++ b/compiler/testData/integration/smoke/syntaxErrors/test.compile.expected @@ -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 ^ diff --git a/compiler/tests/org/jetbrains/kotlin/cli/LauncherScriptTest.kt b/compiler/tests/org/jetbrains/kotlin/cli/LauncherScriptTest.kt index 6b203e1e0de..1bcce9f925f 100644 --- a/compiler/tests/org/jetbrains/kotlin/cli/LauncherScriptTest.kt +++ b/compiler/tests/org/jetbrains/kotlin/cli/LauncherScriptTest.kt @@ -268,7 +268,7 @@ class LauncherScriptTest : TestCaseWithTmpdir() { runProcess( "kotlin", "-no-stdlib", "-e", "println(42)", expectedExitCode = 1, - expectedStderr = """script.kts:1:1: error: unresolved reference: println + expectedStderr = """script.kts:1:1: error: unresolved reference 'println'. println(42) ^ """ @@ -318,7 +318,7 @@ println(42) ) runProcess( "kotlin", "-Xallow-any-scripts-in-source-roots", "-howtorun", ".kts", "$testDataDirectory/noInline.myscript", - expectedExitCode = 1, expectedStderr = """compiler/testData/launcher/noInline.myscript:1:7: error: unresolved reference: CompilerOptions + expectedExitCode = 1, expectedStderr = """compiler/testData/launcher/noInline.myscript:1:7: error: unresolved reference 'CompilerOptions'. @file:CompilerOptions("-Xno-inline") ^ """