diff --git a/compiler/fir/checkers/checkers.jvm/src/org/jetbrains/kotlin/fir/analysis/diagnostics/jvm/FirJvmErrorsDefaultMessages.kt b/compiler/fir/checkers/checkers.jvm/src/org/jetbrains/kotlin/fir/analysis/diagnostics/jvm/FirJvmErrorsDefaultMessages.kt index ad8e13a99a8..0bcad30ea3c 100644 --- a/compiler/fir/checkers/checkers.jvm/src/org/jetbrains/kotlin/fir/analysis/diagnostics/jvm/FirJvmErrorsDefaultMessages.kt +++ b/compiler/fir/checkers/checkers.jvm/src/org/jetbrains/kotlin/fir/analysis/diagnostics/jvm/FirJvmErrorsDefaultMessages.kt @@ -95,7 +95,7 @@ object FirJvmErrorsDefaultMessages : BaseDiagnosticRendererFactory() { map.put( NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS, - "Java type mismatch: inferred type is ''{0}'', but ''{1}'' was expected.{2}", + "Java type mismatch: inferred type is ''{1}'', but ''{0}'' was expected.{2}", RENDER_TYPE, RENDER_TYPE, OPTIONAL_SENTENCE, diff --git a/compiler/testData/cli/jvm/jspecifyDefault.out b/compiler/testData/cli/jvm/jspecifyDefault.out index 7f7a58896f3..0f9b54c5d8e 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: warning: Java type mismatch: inferred type is 'kotlin.Nothing?', but 'kotlin.String' was expected. +compiler/testData/cli/jvm/jspecifyUsage.kt:2:11: warning: Java type mismatch: inferred type is 'kotlin.String', but 'kotlin.Nothing?' was expected. a.foo(null) ^ compiler/testData/cli/jvm/jspecifyUsage.kt:3:5: warning: only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'kotlin.String?'. diff --git a/compiler/testData/cli/jvm/jspecifyWarn.out b/compiler/testData/cli/jvm/jspecifyWarn.out index 7f7a58896f3..0f9b54c5d8e 100644 --- a/compiler/testData/cli/jvm/jspecifyWarn.out +++ b/compiler/testData/cli/jvm/jspecifyWarn.out @@ -1,4 +1,4 @@ -compiler/testData/cli/jvm/jspecifyUsage.kt:2:11: warning: Java type mismatch: inferred type is 'kotlin.Nothing?', but 'kotlin.String' was expected. +compiler/testData/cli/jvm/jspecifyUsage.kt:2:11: warning: Java type mismatch: inferred type is 'kotlin.String', but 'kotlin.Nothing?' was expected. a.foo(null) ^ compiler/testData/cli/jvm/jspecifyUsage.kt:3:5: warning: only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'kotlin.String?'. diff --git a/compiler/testData/cli/jvm/jsr305DeprecatedWarn.out b/compiler/testData/cli/jvm/jsr305DeprecatedWarn.out index 89d4681c329..e19f716a0ef 100644 --- a/compiler/testData/cli/jvm/jsr305DeprecatedWarn.out +++ b/compiler/testData/cli/jvm/jsr305DeprecatedWarn.out @@ -1,5 +1,5 @@ warning: argument -Xjsr305-annotations is deprecated. Please use -Xjsr305 instead -compiler/testData/cli/jvm/jsr305Usage.kt:2:11: warning: Java type mismatch: inferred type is 'kotlin.Nothing?', but 'kotlin.String' was expected. +compiler/testData/cli/jvm/jsr305Usage.kt:2:11: warning: Java type mismatch: inferred type is 'kotlin.String', but 'kotlin.Nothing?' was expected. a.foo(null) ^ OK diff --git a/compiler/testData/cli/jvm/jsr305MigrationFqNameIgnore.out b/compiler/testData/cli/jvm/jsr305MigrationFqNameIgnore.out index a14ffd95130..2ebcc2c26cd 100644 --- a/compiler/testData/cli/jvm/jsr305MigrationFqNameIgnore.out +++ b/compiler/testData/cli/jvm/jsr305MigrationFqNameIgnore.out @@ -1,4 +1,4 @@ -compiler/testData/cli/jvm/jsr305Migration.kt:2:19: warning: Java type mismatch: inferred type is 'kotlin.Nothing?', but 'kotlin.String' was expected. +compiler/testData/cli/jvm/jsr305Migration.kt:2:19: warning: Java type mismatch: inferred type is 'kotlin.String', but 'kotlin.Nothing?' was expected. annotated.foo(null) ^ compiler/testData/cli/jvm/jsr305Migration.kt:4:5: warning: only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'kotlin.String?'. diff --git a/compiler/testData/cli/jvm/jsr305MigrationIgnore.out b/compiler/testData/cli/jvm/jsr305MigrationIgnore.out index a14ffd95130..2ebcc2c26cd 100644 --- a/compiler/testData/cli/jvm/jsr305MigrationIgnore.out +++ b/compiler/testData/cli/jvm/jsr305MigrationIgnore.out @@ -1,4 +1,4 @@ -compiler/testData/cli/jvm/jsr305Migration.kt:2:19: warning: Java type mismatch: inferred type is 'kotlin.Nothing?', but 'kotlin.String' was expected. +compiler/testData/cli/jvm/jsr305Migration.kt:2:19: warning: Java type mismatch: inferred type is 'kotlin.String', but 'kotlin.Nothing?' was expected. annotated.foo(null) ^ compiler/testData/cli/jvm/jsr305Migration.kt:4:5: warning: only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'kotlin.String?'. diff --git a/compiler/testData/cli/jvm/jsr305MigrationWarn.out b/compiler/testData/cli/jvm/jsr305MigrationWarn.out index 90f5472f8e4..02950901a99 100644 --- a/compiler/testData/cli/jvm/jsr305MigrationWarn.out +++ b/compiler/testData/cli/jvm/jsr305MigrationWarn.out @@ -1,7 +1,7 @@ -compiler/testData/cli/jvm/jsr305Migration.kt:2:19: warning: Java type mismatch: inferred type is 'kotlin.Nothing?', but 'kotlin.String' was expected. +compiler/testData/cli/jvm/jsr305Migration.kt:2:19: warning: Java type mismatch: inferred type is 'kotlin.String', but 'kotlin.Nothing?' was expected. annotated.foo(null) ^ -compiler/testData/cli/jvm/jsr305Migration.kt:3:19: warning: Java type mismatch: inferred type is 'kotlin.Nothing?', but 'kotlin.String' was expected. +compiler/testData/cli/jvm/jsr305Migration.kt:3:19: warning: Java type mismatch: inferred type is 'kotlin.String', but 'kotlin.Nothing?' was expected. annotated.bar(null) ^ compiler/testData/cli/jvm/jsr305Migration.kt:4:5: warning: only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'kotlin.String?'. diff --git a/compiler/testData/cli/jvm/jsr305NoFlag.out b/compiler/testData/cli/jvm/jsr305NoFlag.out index 615613ace29..7e9c02d1167 100644 --- a/compiler/testData/cli/jvm/jsr305NoFlag.out +++ b/compiler/testData/cli/jvm/jsr305NoFlag.out @@ -1,4 +1,4 @@ -compiler/testData/cli/jvm/jsr305Usage.kt:2:11: warning: Java type mismatch: inferred type is 'kotlin.Nothing?', but 'kotlin.String' was expected. +compiler/testData/cli/jvm/jsr305Usage.kt:2:11: warning: Java type mismatch: inferred type is 'kotlin.String', but 'kotlin.Nothing?' was expected. a.foo(null) ^ OK diff --git a/compiler/testData/cli/jvm/jsr305Warn.out b/compiler/testData/cli/jvm/jsr305Warn.out index 615613ace29..7e9c02d1167 100644 --- a/compiler/testData/cli/jvm/jsr305Warn.out +++ b/compiler/testData/cli/jvm/jsr305Warn.out @@ -1,4 +1,4 @@ -compiler/testData/cli/jvm/jsr305Usage.kt:2:11: warning: Java type mismatch: inferred type is 'kotlin.Nothing?', but 'kotlin.String' was expected. +compiler/testData/cli/jvm/jsr305Usage.kt:2:11: warning: Java type mismatch: inferred type is 'kotlin.String', but 'kotlin.Nothing?' was expected. a.foo(null) ^ OK