diff --git a/analysis/analysis-api/testData/components/typeInfoProvider/isDenotable/typeParameter.kt b/analysis/analysis-api/testData/components/typeInfoProvider/isDenotable/typeParameter.kt index 81b55d58186..755246fcf87 100644 --- a/analysis/analysis-api/testData/components/typeInfoProvider/isDenotable/typeParameter.kt +++ b/analysis/analysis-api/testData/components/typeInfoProvider/isDenotable/typeParameter.kt @@ -3,7 +3,7 @@ interface A fun test(t: T) { @Denotable("T") t if (t != null) { - (@Nondenotable("T!!") t).equals("") + (@Denotable("T!!") t).equals("") } val outs = take(getOutProjection()) @Denotable("A") outs diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/state/GenerationState.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/state/GenerationState.kt index b6ff18a6bd4..9d9a5375490 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/state/GenerationState.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/state/GenerationState.kt @@ -412,8 +412,8 @@ class GenerationState private constructor( this[KOTLIN_1_3] = oldMetadataVersion this[KOTLIN_1_4] = JvmMetadataVersion(1, 4, 3) this[KOTLIN_1_5] = JvmMetadataVersion(1, 5, 1) - this[KOTLIN_1_6] = JvmMetadataVersion.INSTANCE - this[KOTLIN_1_7] = JvmMetadataVersion(1, 7, 0) + this[KOTLIN_1_6] = JvmMetadataVersion(1, 6, 0) + this[KOTLIN_1_7] = JvmMetadataVersion.INSTANCE this[KOTLIN_1_8] = JvmMetadataVersion(1, 8, 0) this[KOTLIN_1_9] = JvmMetadataVersion(1, 9, 0) diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/lambdaInLambda.kt b/compiler/fir/analysis-tests/testData/resolve/arguments/lambdaInLambda.kt index a9bf5611d0e..234bcba4c74 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/lambdaInLambda.kt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/lambdaInLambda.kt @@ -16,7 +16,7 @@ fun test(ordinal: Int) { buildString { insert(KDocTemplate()) { definition { - ordinal?.let {} + ordinal?.let {} } } } diff --git a/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/negative/missingBooleanBranch.kt b/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/negative/missingBooleanBranch.kt index 30b5e388410..5b51bd9b806 100644 --- a/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/negative/missingBooleanBranch.kt +++ b/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/negative/missingBooleanBranch.kt @@ -27,7 +27,7 @@ fun test_2(cond: Boolean?) { } fun test_3(cond: Boolean) { - when (cond) { + when (cond) { true -> 1 } } diff --git a/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/negative/missingEnumEntry.kt b/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/negative/missingEnumEntry.kt index eda7c7e5889..7cc1e63175d 100644 --- a/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/negative/missingEnumEntry.kt +++ b/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/negative/missingEnumEntry.kt @@ -27,7 +27,7 @@ fun test_2(enum: SomeEnum?) { } fun test_3(enum: SomeEnum) { - when (enum) { + when (enum) { SomeEnum.A -> 1 } } diff --git a/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/negative/missingSealedInheritor.kt b/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/negative/missingSealedInheritor.kt index 4649a6dd78c..65b53a819b7 100644 --- a/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/negative/missingSealedInheritor.kt +++ b/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/negative/missingSealedInheritor.kt @@ -44,7 +44,7 @@ fun test_2(base: Base?) { } fun test_3(base: Base) { - when (base) { + when (base) { is A -> 1 } } diff --git a/compiler/fir/analysis-tests/testData/resolve/inlineClasses/inlineClassDeclaration.kt b/compiler/fir/analysis-tests/testData/resolve/inlineClasses/inlineClassDeclaration.kt index 14557fecc67..2eaf0123aa2 100644 --- a/compiler/fir/analysis-tests/testData/resolve/inlineClasses/inlineClassDeclaration.kt +++ b/compiler/fir/analysis-tests/testData/resolve/inlineClasses/inlineClassDeclaration.kt @@ -17,4 +17,4 @@ class A { open class Test inline class ExtendTest(val x: Int): Test -inline class ImplementByDelegation(val x: Int) : Comparable by x +inline class ImplementByDelegation(val x: Int) : Comparable by x diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcasts.kt b/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcasts.kt index 620472c2308..148f8af2c9b 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcasts.kt +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcasts.kt @@ -69,8 +69,8 @@ fun test_6(d1: D) { } fun test_7(d1: D, d2: D) { - val a = d1?.any - val b = d2?.any + val a = d1?.any + val b = d2?.any a as A a.foo() // should be OK b as B diff --git a/compiler/fir/analysis-tests/testData/resolve/types/bareWithSubjectTypeAlias.kt b/compiler/fir/analysis-tests/testData/resolve/types/bareWithSubjectTypeAlias.kt index c445d71b785..924d94d168c 100644 --- a/compiler/fir/analysis-tests/testData/resolve/types/bareWithSubjectTypeAlias.kt +++ b/compiler/fir/analysis-tests/testData/resolve/types/bareWithSubjectTypeAlias.kt @@ -8,7 +8,7 @@ typealias TA = A fun bar(): TA = TODO() fun foo() { - when (val a = bar()) { + when (val a = bar()) { is A.B -> a.x.length } } diff --git a/compiler/testData/cli/jvm/apiVersionAndSinceNewerKotlin.kt b/compiler/testData/cli/jvm/apiVersionAndSinceNewerKotlin.kt index bbb8764f3a2..a42fcbdfa77 100644 --- a/compiler/testData/cli/jvm/apiVersionAndSinceNewerKotlin.kt +++ b/compiler/testData/cli/jvm/apiVersionAndSinceNewerKotlin.kt @@ -1,5 +1,5 @@ -@SinceKotlin("1.4") +@SinceKotlin("1.5") fun old() {} -@SinceKotlin("1.5") +@SinceKotlin("1.6") fun new() {} diff --git a/compiler/testData/cli/jvm/apiVersionAndSinceNewerKotlin.out b/compiler/testData/cli/jvm/apiVersionAndSinceNewerKotlin.out index 77f33986ee9..673c7b97b5e 100644 --- a/compiler/testData/cli/jvm/apiVersionAndSinceNewerKotlin.out +++ b/compiler/testData/cli/jvm/apiVersionAndSinceNewerKotlin.out @@ -1,5 +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:4:1: warning: the version is greater than the specified API version 1.4 +compiler/testData/cli/jvm/apiVersionAndSinceNewerKotlin.kt:1:1: warning: the version is greater than the specified API version 1.4 @SinceKotlin("1.5") ^ +compiler/testData/cli/jvm/apiVersionAndSinceNewerKotlin.kt:4:1: warning: the version is greater than the specified API version 1.4 +@SinceKotlin("1.6") +^ OK diff --git a/compiler/testData/cli/jvm/apiVersionInvalid.out b/compiler/testData/cli/jvm/apiVersionInvalid.out index ae650abee8f..7c8cfb4bd93 100644 --- a/compiler/testData/cli/jvm/apiVersionInvalid.out +++ b/compiler/testData/cli/jvm/apiVersionInvalid.out @@ -1,3 +1,3 @@ error: unknown API version: 239.42 -Supported API versions: 1.3 (DEPRECATED), 1.4 (DEPRECATED), 1.5, 1.6, 1.7 (EXPERIMENTAL), 1.8 (EXPERIMENTAL), 1.9 (EXPERIMENTAL) +Supported API versions: 1.3 (DEPRECATED), 1.4 (DEPRECATED), 1.5, 1.6, 1.7, 1.8 (EXPERIMENTAL), 1.9 (EXPERIMENTAL) COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/languageVersionInvalid.out b/compiler/testData/cli/jvm/languageVersionInvalid.out index 1c34775732c..990f865d115 100644 --- a/compiler/testData/cli/jvm/languageVersionInvalid.out +++ b/compiler/testData/cli/jvm/languageVersionInvalid.out @@ -1,3 +1,3 @@ error: unknown language version: 239.42 -Supported language versions: 1.3 (DEPRECATED), 1.4 (DEPRECATED), 1.5, 1.6, 1.7 (EXPERIMENTAL), 1.8 (EXPERIMENTAL), 1.9 (EXPERIMENTAL) +Supported language versions: 1.3 (DEPRECATED), 1.4 (DEPRECATED), 1.5, 1.6, 1.7, 1.8 (EXPERIMENTAL), 1.9 (EXPERIMENTAL) COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/readingConfigFromEnvironment/appendingArgs.out b/compiler/testData/cli/jvm/readingConfigFromEnvironment/appendingArgs.out index 65dcd99c86f..a7d5594a706 100644 --- a/compiler/testData/cli/jvm/readingConfigFromEnvironment/appendingArgs.out +++ b/compiler/testData/cli/jvm/readingConfigFromEnvironment/appendingArgs.out @@ -1,9 +1,6 @@ compiler/testData/cli/jvm/readingConfigFromEnvironment/appendingArgs.kt:4:9: warning: [UNUSED_VARIABLE] Variable 'x' is never used val x = 1?.dec() ^ -compiler/testData/cli/jvm/readingConfigFromEnvironment/appendingArgs.kt:4:13: warning: [SAFE_CALL_WILL_CHANGE_NULLABILITY] Safe call on a non-null receiver will have nullable type in future releases - val x = 1?.dec() - ^ compiler/testData/cli/jvm/readingConfigFromEnvironment/appendingArgs.kt:4:14: warning: [UNNECESSARY_SAFE_CALL] Unnecessary safe call on a non-null receiver of type Int val x = 1?.dec() ^ diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/kt22694_1_3.kt b/compiler/testData/codegen/box/coroutines/controlFlow/kt22694_1_3.kt index d241722a5b4..3e60e95f24d 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/kt22694_1_3.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/kt22694_1_3.kt @@ -41,6 +41,7 @@ fun getSequence(a: Foo) = Foo.E-> { yield("E") } + else -> {} } yield("end") } diff --git a/compiler/testData/codegen/box/delegation/delegationWithPrivateConstructor.kt b/compiler/testData/codegen/box/delegation/delegationWithPrivateConstructor.kt index 0fcef72f872..f7e3f37abf3 100644 --- a/compiler/testData/codegen/box/delegation/delegationWithPrivateConstructor.kt +++ b/compiler/testData/codegen/box/delegation/delegationWithPrivateConstructor.kt @@ -1,4 +1,4 @@ -class MyObject private constructor(val delegate: Interface) : Interface by delegate { +class MyObject private constructor(private val delegate: Interface) : Interface by delegate { constructor() : this(Delegate()) } @@ -8,7 +8,7 @@ class Delegate : Interface { } } -private interface Interface { +interface Interface { fun greet(): String } diff --git a/compiler/testData/codegen/box/inlineClasses/overrideReturnNothing.kt b/compiler/testData/codegen/box/inlineClasses/overrideReturnNothing.kt index f03c9436cbd..025758015ec 100644 --- a/compiler/testData/codegen/box/inlineClasses/overrideReturnNothing.kt +++ b/compiler/testData/codegen/box/inlineClasses/overrideReturnNothing.kt @@ -1,8 +1,6 @@ // WITH_STDLIB -// CHECK_BYTECODE_LISTING // IGNORE_BACKEND: JS, JS_IR, WASM, NATIVE // TODO: Fir2Ir generates overrides as finals. -// IGNORE_BACKEND_FIR: JVM_IR @JvmInline value class Inlined(val value: Int) diff --git a/compiler/testData/codegen/box/inlineClasses/overrideReturnNothing.txt b/compiler/testData/codegen/box/inlineClasses/overrideReturnNothing.txt deleted file mode 100644 index fb1da85516e..00000000000 --- a/compiler/testData/codegen/box/inlineClasses/overrideReturnNothing.txt +++ /dev/null @@ -1,48 +0,0 @@ -@kotlin.Metadata -public interface A { - // source: 'overrideReturnNothing.kt' - public abstract @org.jetbrains.annotations.Nullable method foo-wSRmS7I(): Inlined - public abstract method foo2-yXoPhBc(): int - public abstract @org.jetbrains.annotations.Nullable method getProperty-wSRmS7I(): Inlined - public abstract method getProperty2-yXoPhBc(): int -} - -@kotlin.Metadata -public final class B { - // source: 'overrideReturnNothing.kt' - private final @org.jetbrains.annotations.Nullable field property: java.lang.Void - public method (): void - public @org.jetbrains.annotations.Nullable method foo(): java.lang.Void - public synthetic bridge method foo-wSRmS7I(): Inlined - public @org.jetbrains.annotations.NotNull method foo2(): java.lang.Void - public synthetic bridge method foo2-yXoPhBc(): int - public @org.jetbrains.annotations.Nullable method getProperty(): java.lang.Void - public synthetic bridge method getProperty-wSRmS7I(): Inlined - public @org.jetbrains.annotations.NotNull method getProperty2(): java.lang.Void - public synthetic bridge method getProperty2-yXoPhBc(): int -} - -@kotlin.jvm.JvmInline -@kotlin.Metadata -public final class Inlined { - // source: 'overrideReturnNothing.kt' - private final field value: int - private synthetic method (p0: int): void - public synthetic final static method box-impl(p0: int): Inlined - public static method constructor-impl(p0: int): int - public method equals(p0: java.lang.Object): boolean - public static method equals-impl(p0: int, p1: java.lang.Object): boolean - public final static method equals-impl0(p0: int, p1: int): boolean - public final method getValue(): int - public method hashCode(): int - public static method hashCode-impl(p0: int): int - public method toString(): java.lang.String - public static method toString-impl(p0: int): java.lang.String - public synthetic final method unbox-impl(): int -} - -@kotlin.Metadata -public final class OverrideReturnNothingKt { - // source: 'overrideReturnNothing.kt' - public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String -} diff --git a/compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBodyWithJavaGeneric.kt b/compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBodyWithJavaGeneric.kt index c9ff5fc84d7..1ac80930223 100644 --- a/compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBodyWithJavaGeneric.kt +++ b/compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBodyWithJavaGeneric.kt @@ -1,5 +1,7 @@ // !LANGUAGE: +StrictJavaNullabilityAssertions -ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated // TARGET_BACKEND: JVM +// IGNORE_BACKEND_FIR: JVM_IR +// FIR status: expected: but was: , issue related to T & Any // See KT-8135 // We could generate runtime assertion on call site for 'generic()' below. diff --git a/compiler/testData/codegen/box/when/emptyWhen.kt b/compiler/testData/codegen/box/when/emptyWhen.kt index 62ab58b6bf3..58fbad659db 100644 --- a/compiler/testData/codegen/box/when/emptyWhen.kt +++ b/compiler/testData/codegen/box/when/emptyWhen.kt @@ -2,6 +2,6 @@ enum class A { X1, X2 } fun box(): String { when {} - when (A.X1) {} + when (A.X1) { else -> {} } return "OK" } diff --git a/compiler/testData/codegen/box/when/enumOptimization/bigEnum.kt b/compiler/testData/codegen/box/when/enumOptimization/bigEnum.kt index 5d5558daad4..9ea4f0e60be 100644 --- a/compiler/testData/codegen/box/when/enumOptimization/bigEnum.kt +++ b/compiler/testData/codegen/box/when/enumOptimization/bigEnum.kt @@ -15,10 +15,8 @@ fun bar1(x : BigEnum) : String { when (x) { BigEnum.ITEM1, BigEnum.ITEM2, BigEnum.ITEM3 -> return "123" BigEnum.ITEM4, BigEnum.ITEM5, BigEnum.ITEM6 -> return "456" + else -> return "-1"; } - - return "-1"; - } fun bar2(x : BigEnum) : String { diff --git a/compiler/testData/codegen/box/when/enumOptimization/manyWhensWithinClass.kt b/compiler/testData/codegen/box/when/enumOptimization/manyWhensWithinClass.kt index e0d5ecdb32f..c95b3bffa65 100644 --- a/compiler/testData/codegen/box/when/enumOptimization/manyWhensWithinClass.kt +++ b/compiler/testData/codegen/box/when/enumOptimization/manyWhensWithinClass.kt @@ -20,9 +20,8 @@ class A { Season.WINTER, Season.SPRING -> return "winter_spring" Season.SPRING -> return "spring" Season.SUMMER -> return "summer" + else -> return "autumn"; } - - return "autumn"; } public fun bar2(y : Season) : String { diff --git a/compiler/testData/codegen/box/when/enumOptimization/nullability.kt b/compiler/testData/codegen/box/when/enumOptimization/nullability.kt index f529f052038..763cf4f9343 100644 --- a/compiler/testData/codegen/box/when/enumOptimization/nullability.kt +++ b/compiler/testData/codegen/box/when/enumOptimization/nullability.kt @@ -21,18 +21,16 @@ fun foo1(x : Season?) : String { when(x) { Season.AUTUMN, Season.SPRING -> return "autumn_or_spring"; Season.SUMMER, null -> return "summer_or_null" + else -> return "other" } - - return "other" } fun foo2(x : Season?) : String { when(x) { Season.AUTUMN, Season.SPRING -> return "autumn_or_spring"; Season.SUMMER -> return "summer" + else -> return "other" } - - return "other" } fun box() : String { diff --git a/compiler/testData/codegen/box/when/enumOptimization/withoutElse.kt b/compiler/testData/codegen/box/when/enumOptimization/withoutElse.kt index 63480728d22..f4f250d1885 100644 --- a/compiler/testData/codegen/box/when/enumOptimization/withoutElse.kt +++ b/compiler/testData/codegen/box/when/enumOptimization/withoutElse.kt @@ -20,8 +20,8 @@ fun bar1(x : Season) : String { Season.WINTER, Season.SPRING -> return "winter_spring" Season.SPRING -> return "spring" Season.SUMMER -> return "summer" + else -> return "autumn" } - return "autumn" } fun bar2(x : Season) : String { @@ -30,9 +30,8 @@ fun bar2(x : Season) : String { Season.SPRING -> return "spring" Season.SUMMER -> return "summer" Season.AUTUMN -> return "autumn" + else -> return "fail unknown" } - - return "fail unknown" } fun box() : String { diff --git a/compiler/testData/codegen/box/when/whenSubjectVariable/whenByNullableEnum.kt b/compiler/testData/codegen/box/when/whenSubjectVariable/whenByNullableEnum.kt index 592757e6901..8bfa865a6b0 100644 --- a/compiler/testData/codegen/box/when/whenSubjectVariable/whenByNullableEnum.kt +++ b/compiler/testData/codegen/box/when/whenSubjectVariable/whenByNullableEnum.kt @@ -14,18 +14,16 @@ fun foo1(x : Season?) : String { when(val xx = x) { Season.AUTUMN, Season.SPRING -> return "autumn_or_spring $xx"; Season.SUMMER, null -> return "summer_or_null $xx" + else -> return "other" } - - return "other" } fun foo2(x : Season?) : String { when(val xx = x) { Season.AUTUMN, Season.SPRING -> return "autumn_or_spring $xx"; Season.SUMMER -> return "summer" + else -> return "other" } - - return "other" } fun box() : String { diff --git a/compiler/testData/codegen/bytecodeText/nullCheckOptimization/redundantSafeCall.kt b/compiler/testData/codegen/bytecodeText/nullCheckOptimization/redundantSafeCall.kt index 5a1fe4989db..1d7c468771f 100644 --- a/compiler/testData/codegen/bytecodeText/nullCheckOptimization/redundantSafeCall.kt +++ b/compiler/testData/codegen/bytecodeText/nullCheckOptimization/redundantSafeCall.kt @@ -3,4 +3,4 @@ fun test(s: String) = s?.length // 0 IFNULL // 0 IFNONNULL // 0 intValue -// 0 valueOf +// 1 valueOf diff --git a/compiler/testData/codegen/bytecodeText/whenEnumOptimization/bigEnum.kt b/compiler/testData/codegen/bytecodeText/whenEnumOptimization/bigEnum.kt index 230eae422bb..89bfca74e97 100644 --- a/compiler/testData/codegen/bytecodeText/whenEnumOptimization/bigEnum.kt +++ b/compiler/testData/codegen/bytecodeText/whenEnumOptimization/bigEnum.kt @@ -9,10 +9,8 @@ fun bar1(x : BigEnum) : String { when (x) { BigEnum.ITEM1, BigEnum.ITEM2, BigEnum.ITEM3 -> return "123" BigEnum.ITEM4, BigEnum.ITEM5, BigEnum.ITEM6 -> return "456" + else -> return "-1" } - - return "-1"; - } fun bar2(x : BigEnum) : String { diff --git a/compiler/testData/codegen/bytecodeText/whenEnumOptimization/manyWhensWithinClass.kt b/compiler/testData/codegen/bytecodeText/whenEnumOptimization/manyWhensWithinClass.kt index 34dad145a32..a519afb08f8 100644 --- a/compiler/testData/codegen/bytecodeText/whenEnumOptimization/manyWhensWithinClass.kt +++ b/compiler/testData/codegen/bytecodeText/whenEnumOptimization/manyWhensWithinClass.kt @@ -13,9 +13,8 @@ class A { Season.WINTER, Season.SPRING -> return "winter_spring" Season.SPRING -> return "spring" Season.SUMMER -> return "summer" + else -> return "autumn" } - - return "autumn"; } public fun bar2(y : Season) : String { diff --git a/compiler/testData/codegen/bytecodeText/whenEnumOptimization/nullability.kt b/compiler/testData/codegen/bytecodeText/whenEnumOptimization/nullability.kt index 4a4a6cc6340..0ff79856aa8 100644 --- a/compiler/testData/codegen/bytecodeText/whenEnumOptimization/nullability.kt +++ b/compiler/testData/codegen/bytecodeText/whenEnumOptimization/nullability.kt @@ -9,18 +9,16 @@ fun foo1(x : Season?) : String { when(x) { Season.AUTUMN, Season.SPRING -> return "autumn_or_spring"; Season.SUMMER, null -> return "summer_or_null" + else -> return "other" } - - return "other" } fun foo2(x : Season?) : String { when(x) { Season.AUTUMN, Season.SPRING -> return "autumn_or_spring"; Season.SUMMER -> return "summer" + else -> return "other" } - - return "other" } // 2 TABLESWITCH diff --git a/compiler/testData/codegen/bytecodeText/whenEnumOptimization/withoutElse.kt b/compiler/testData/codegen/bytecodeText/whenEnumOptimization/withoutElse.kt index 09e8377c0b4..cd64192cfd1 100644 --- a/compiler/testData/codegen/bytecodeText/whenEnumOptimization/withoutElse.kt +++ b/compiler/testData/codegen/bytecodeText/whenEnumOptimization/withoutElse.kt @@ -12,8 +12,8 @@ fun bar1(x : Season) : String { Season.WINTER, Season.SPRING -> return "winter_spring" Season.SPRING -> return "spring" Season.SUMMER -> return "summer" + else -> return "autumn" } - return "autumn" } fun bar2(x : Season) : String { @@ -22,9 +22,8 @@ fun bar2(x : Season) : String { Season.SPRING -> return "spring" Season.SUMMER -> return "summer" Season.AUTUMN -> return "autumn" + else -> return "fail unknown" } - - return "fail unknown" } // 2 TABLESWITCH diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/output.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/output.txt index 48b5bbe1983..d248e58533d 100644 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/output.txt +++ b/compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/output.txt @@ -1,37 +1,37 @@ -compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:13: error: 'A' is only available since Kotlin 42.33 and cannot be used in Kotlin 1.6. This declaration is only supported since Kotlin 42.33 +compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:13: error: 'A' is only available since Kotlin 42.33 and cannot be used in Kotlin 1.7. This declaration is only supported since Kotlin 42.33 fun test(a: A): TA { ^ -compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:13: error: 'A' is only available since Kotlin 40.34 and cannot be used in Kotlin 1.6 +compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:13: error: 'A' is only available since Kotlin 40.34 and cannot be used in Kotlin 1.7 fun test(a: A): TA { ^ -compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:13: error: 'A' is only available since Kotlin 45.35 and cannot be used in Kotlin 1.6 +compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:13: error: 'A' is only available since Kotlin 45.35 and cannot be used in Kotlin 1.7 fun test(a: A): TA { ^ -compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:17: error: 'typealias TA = String' is only available since Kotlin 42.33 and cannot be used in Kotlin 1.6. This declaration is only supported since Kotlin 42.33 +compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:17: error: 'typealias TA = String' is only available since Kotlin 42.33 and cannot be used in Kotlin 1.7. This declaration is only supported since Kotlin 42.33 fun test(a: A): TA { ^ -compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:17: error: 'typealias TA = String' is only available since Kotlin 40.34 and cannot be used in Kotlin 1.6 +compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:17: error: 'typealias TA = String' is only available since Kotlin 40.34 and cannot be used in Kotlin 1.7 fun test(a: A): TA { ^ -compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:17: error: 'typealias TA = String' is only available since Kotlin 45.35 and cannot be used in Kotlin 1.6 +compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:17: error: 'typealias TA = String' is only available since Kotlin 45.35 and cannot be used in Kotlin 1.7 fun test(a: A): TA { ^ -compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:4:5: error: 'f(): Unit' is only available since Kotlin 42.33 and cannot be used in Kotlin 1.6. This declaration is only supported since Kotlin 42.33 +compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:4:5: error: 'f(): Unit' is only available since Kotlin 42.33 and cannot be used in Kotlin 1.7. This declaration is only supported since Kotlin 42.33 f() ^ -compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:4:5: error: 'f(): Unit' is only available since Kotlin 40.34 and cannot be used in Kotlin 1.6 +compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:4:5: error: 'f(): Unit' is only available since Kotlin 40.34 and cannot be used in Kotlin 1.7 f() ^ -compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:4:5: error: 'f(): Unit' is only available since Kotlin 45.35 and cannot be used in Kotlin 1.6 +compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:4:5: error: 'f(): Unit' is only available since Kotlin 45.35 and cannot be used in Kotlin 1.7 f() ^ -compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:5:12: error: 'p: String' is only available since Kotlin 42.33 and cannot be used in Kotlin 1.6. This declaration is only supported since Kotlin 42.33 +compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:5:12: error: 'p: String' is only available since Kotlin 42.33 and cannot be used in Kotlin 1.7. This declaration is only supported since Kotlin 42.33 return p ^ -compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:5:12: error: 'p: String' is only available since Kotlin 40.34 and cannot be used in Kotlin 1.6 +compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:5:12: error: 'p: String' is only available since Kotlin 40.34 and cannot be used in Kotlin 1.7 return p ^ -compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:5:12: error: 'p: String' is only available since Kotlin 45.35 and cannot be used in Kotlin 1.6 +compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:5:12: error: 'p: String' is only available since Kotlin 45.35 and cannot be used in Kotlin 1.7 return p ^ COMPILATION_ERROR diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClasses/output.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClasses/output.txt index 570d92fa0f0..84559521948 100644 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClasses/output.txt +++ b/compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClasses/output.txt @@ -1,7 +1,7 @@ -compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClasses/source.kt:3:19: error: 'Nested' is only available since Kotlin 1.44 and cannot be used in Kotlin 1.6 +compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClasses/source.kt:3:19: error: 'Nested' is only available since Kotlin 1.44 and cannot be used in Kotlin 1.7 fun test(a: Outer.Nested) { ^ -compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClasses/source.kt:4:7: error: 'f(): Unit' is only available since Kotlin 1.88 and cannot be used in Kotlin 1.6 +compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClasses/source.kt:4:7: error: 'f(): Unit' is only available since Kotlin 1.88 and cannot be used in Kotlin 1.7 a.f() ^ COMPILATION_ERROR diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesAgainst14Js/output.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesAgainst14Js/output.txt index ef29e66b492..a8b3e278436 100644 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesAgainst14Js/output.txt +++ b/compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesAgainst14Js/output.txt @@ -1,7 +1,7 @@ -compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesAgainst14Js/source.kt:3:19: error: 'Nested' is only available since Kotlin 1.44 and cannot be used in Kotlin 1.6 +compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesAgainst14Js/source.kt:3:19: error: 'Nested' is only available since Kotlin 1.44 and cannot be used in Kotlin 1.7 fun test(a: Outer.Nested) { ^ -compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesAgainst14Js/source.kt:4:7: error: 'f(): Unit' is only available since Kotlin 1.88 and cannot be used in Kotlin 1.6 +compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesAgainst14Js/source.kt:4:7: error: 'f(): Unit' is only available since Kotlin 1.88 and cannot be used in Kotlin 1.7 a.f() ^ COMPILATION_ERROR diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesJs/output.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesJs/output.txt index 86eccb127d5..09087d1cf68 100644 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesJs/output.txt +++ b/compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesJs/output.txt @@ -1,7 +1,7 @@ -compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesJs/source.kt:3:19: error: 'Nested' is only available since Kotlin 1.44 and cannot be used in Kotlin 1.6 +compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesJs/source.kt:3:19: error: 'Nested' is only available since Kotlin 1.44 and cannot be used in Kotlin 1.7 fun test(a: Outer.Nested) { ^ -compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesJs/source.kt:4:7: error: 'f(): Unit' is only available since Kotlin 1.88 and cannot be used in Kotlin 1.6 +compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesJs/source.kt:4:7: error: 'f(): Unit' is only available since Kotlin 1.88 and cannot be used in Kotlin 1.7 a.f() ^ COMPILATION_ERROR diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/output.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/output.txt index 83015d120cb..baddeb648a6 100644 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/output.txt +++ b/compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/output.txt @@ -1,6 +1,6 @@ error: incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors -$TMP_DIR$/library.jar!/META-INF/main.kotlin_module: error: module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.0, expected version is $ABI_VERSION$. -compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:3:13: error: class 'a.C' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.0, expected version is $ABI_VERSION$. +$TMP_DIR$/library.jar!/META-INF/main.kotlin_module: error: module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is $ABI_VERSION$. +compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:3:13: error: class 'a.C' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is $ABI_VERSION$. The class is loaded from $TMP_DIR$/library.jar!/a/C.class fun test(c: C) { ^ @@ -10,15 +10,15 @@ compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemant compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:5:5: error: unresolved reference: v v ^ -compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:6:5: error: class 'a.C' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.0, expected version is $ABI_VERSION$. +compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:6:5: error: class 'a.C' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is $ABI_VERSION$. The class is loaded from $TMP_DIR$/library.jar!/a/C.class c.let { C() } ^ -compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:6:7: error: class 'a.C' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.0, expected version is $ABI_VERSION$. +compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:6:7: error: class 'a.C' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is $ABI_VERSION$. The class is loaded from $TMP_DIR$/library.jar!/a/C.class c.let { C() } ^ -compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:6:13: error: class 'a.C' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.0, expected version is $ABI_VERSION$. +compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/source.kt:6:13: error: class 'a.C' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is $ABI_VERSION$. The class is loaded from $TMP_DIR$/library.jar!/a/C.class c.let { C() } ^ diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/checkerFramework.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/checkerFramework.txt index 13b4adbf6cf..57461773af5 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/checkerFramework.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/checkerFramework.txt @@ -12,3 +12,4 @@ public open class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/WildcardsWithDefault.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/WildcardsWithDefault.txt index 9791fd8aaa3..63de62cdd61 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/WildcardsWithDefault.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/WildcardsWithDefault.txt @@ -2,8 +2,8 @@ package public fun main(/*0*/ aNotNullNotNullNotNull: A, /*1*/ aNotNullNotNullNull: A, /*2*/ aNotNullNullNotNull: A, /*3*/ aNotNullNullNull: A, /*4*/ b: WildcardsWithDefault): kotlin.Unit -public open class A { - public constructor A() +public open class A { + public constructor A() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jsr305/defaultAnnotationAppliedToType.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jsr305/defaultAnnotationAppliedToType.kt index e6d2c8ba13d..979dfdc53fa 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jsr305/defaultAnnotationAppliedToType.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jsr305/defaultAnnotationAppliedToType.kt @@ -58,7 +58,7 @@ public class A { // FILE: main.kt fun main(a: A) { a.foo("").length - a.foo(null)?.length + a.foo(null)?.length a.bar("").length a.bar(null)?.length @@ -73,5 +73,5 @@ fun main(a: A) { a.baz3().get(0).length a.baz3()!!.get(0).length - a.baz3()!!.get(0)?.length + a.baz3()!!.get(0)?.length } diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt index 83bdadb359b..34ef4c49f09 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt @@ -56,7 +56,7 @@ public class A { // FILE: main.kt fun main(a: A) { a.foo("").length - a.foo(null)?.length + a.foo(null)?.length a.bar("").length a.bar(null)?.length diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jsr305/springNullableWithTypeUse.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jsr305/springNullableWithTypeUse.kt index e5ae312e28a..79296525360 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jsr305/springNullableWithTypeUse.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jsr305/springNullableWithTypeUse.kt @@ -63,17 +63,17 @@ public class A { // FILE: main.kt fun main(a: A) { - a.foo("", null)?.length + a.foo("", null)?.length a.foo("", null).length a.foo(null, "").length a.bar().length a.bar()!!.length - a.field?.length + a.field?.length a.field.length a.baz().get(0) a.baz()!!.get(0).get(0) - a.baz()!!.get(0)?.get(0) + a.baz()!!.get(0)?.get(0) } diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jsr305/typeUseVsMethodConflict.fir.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jsr305/typeUseVsMethodConflict.fir.kt index e7e1d501079..c1f2bfbd0d2 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jsr305/typeUseVsMethodConflict.fir.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jsr305/typeUseVsMethodConflict.fir.kt @@ -58,10 +58,10 @@ public class A { // FILE: main.kt fun main(a: A) { a.foo("").length - a.foo(null)?.length + a.foo(null)?.length a.bar("").length - a.bar(null)?.length + a.bar(null)?.length a.baz1().get(0).length a.baz1()!!.get(0).length diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jsr305/typeUseVsMethodConflict.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jsr305/typeUseVsMethodConflict.kt index b6b3a116bf9..a18cdcbf352 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jsr305/typeUseVsMethodConflict.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jsr305/typeUseVsMethodConflict.kt @@ -58,7 +58,7 @@ public class A { // FILE: main.kt fun main(a: A) { a.foo("").length - a.foo(null)?.length + a.foo(null)?.length a.bar("").length a.bar(null)?.length @@ -73,5 +73,5 @@ fun main(a: A) { a.baz3().get(0).length a.baz3()!!.get(0).length - a.baz3()!!.get(0)?.length + a.baz3()!!.get(0)?.length } diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/kt48261.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/kt48261.txt index c89fedfa57c..7dfe5b68072 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/kt48261.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/kt48261.txt @@ -73,3 +73,4 @@ public abstract class MyList : MyCollection, kotlin.c invisible_fake open override /*1*/ /*fake_override*/ fun finishToArray(/*0*/ p0: kotlin.Array<(out) T!>!, /*1*/ p1: kotlin.collections.(Mutable)Iterator<*>!): kotlin.Array<(out) T!>! invisible_fake open override /*1*/ /*fake_override*/ fun hugeCapacity(/*0*/ p0: kotlin.Int): kotlin.Int } + diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/methodWithTypeParameter.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/methodWithTypeParameter.txt index 3f6c9954188..f4d230d963c 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/methodWithTypeParameter.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/methodWithTypeParameter.txt @@ -42,3 +42,4 @@ public/*package*/ open class Outer { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } } + diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/notNullVarargsOverrides.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/notNullVarargsOverrides.txt index e93bffc23b6..20720bf11a9 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/notNullVarargsOverrides.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/notNullVarargsOverrides.txt @@ -4,7 +4,7 @@ public final class A : BaseClass { public constructor A() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun loadCache(/*0*/ @org.checkerframework.checker.nullness.qual.NonNull vararg args: @org.checkerframework.checker.nullness.qual.NonNull kotlin.Any /*kotlin.Array<(out) @org.checkerframework.checker.nullness.qual.NonNull kotlin.Any>*/): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun loadCache(/*0*/ @org.checkerframework.checker.nullness.qual.NonNull vararg args: @org.checkerframework.checker.nullness.qual.NonNull kotlin.Any /*kotlin.Array<(out) @org.checkerframework.checker.nullness.qual.NonNull kotlin.Any>!*/): kotlin.Unit public open fun loadCache(/*0*/ vararg args: kotlin.Any? /*kotlin.Array*/): kotlin.Unit public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } @@ -21,6 +21,7 @@ public open class BaseClass { public constructor BaseClass() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open fun loadCache(/*0*/ @org.checkerframework.checker.nullness.qual.NonNull vararg args: @org.checkerframework.checker.nullness.qual.NonNull kotlin.Any /*kotlin.Array<(out) @org.checkerframework.checker.nullness.qual.NonNull kotlin.Any>*/): kotlin.Unit + public open fun loadCache(/*0*/ @org.checkerframework.checker.nullness.qual.NonNull vararg args: @org.checkerframework.checker.nullness.qual.NonNull kotlin.Any /*kotlin.Array<(out) @org.checkerframework.checker.nullness.qual.NonNull kotlin.Any>!*/): kotlin.Unit public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/useTypeParameterAnnotationToEnhanceItsUsages.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/useTypeParameterAnnotationToEnhanceItsUsages.kt index 8c273d4ed7f..31e8a65501d 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/useTypeParameterAnnotationToEnhanceItsUsages.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/useTypeParameterAnnotationToEnhanceItsUsages.kt @@ -10,5 +10,5 @@ public interface MapLike<@org.jetbrains.annotations.NotNull K> { // FILE: main.kt fun test2(map : MapLike, x2: Int?) { - map.put(x2) -} \ No newline at end of file + map.put(x2) +} diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/androidSdk.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/androidSdk.txt index b581eea64db..59b35eb326b 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/androidSdk.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/androidSdk.txt @@ -12,3 +12,4 @@ public open class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/android_support.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/android_support.txt index 245c8f0f6c7..6096deefeec 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/android_support.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/android_support.txt @@ -12,3 +12,4 @@ public open class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/androidx.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/androidx.txt index 5db379d2aa2..b08dafcbb41 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/androidx.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/androidx.txt @@ -12,3 +12,4 @@ public open class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/aosp.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/aosp.txt index ae33cd45aa0..dd00b442627 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/aosp.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/aosp.txt @@ -12,3 +12,4 @@ public open class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/eclipse.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/eclipse.txt index d73832edc45..324327d1e0a 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/eclipse.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/eclipse.txt @@ -12,3 +12,4 @@ public open class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/safeCalls.fir.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/safeCalls.fir.kt index ebfdb842a1c..26fe5ebf78e 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/safeCalls.fir.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/safeCalls.fir.kt @@ -64,7 +64,7 @@ fun safeCalls() { val a = jsr.string?.length val b = jsrNullable?.string?.length - val c = jb.string?.length + val c = jb.string?.length val d = jbNullable?.string?.length val e = platform.string?.length diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/safeCalls.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/safeCalls.kt index 529148164be..39c0347a208 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/safeCalls.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/safeCalls.kt @@ -64,7 +64,7 @@ fun safeCalls() { val a = jsr.string?.length val b = jsrNullable?.string?.length - val c = jb.string?.length + val c = jb.string?.length val d = jbNullable?.string?.length val e = platform.string?.length diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.fir.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.fir.kt index a0cddf033db..8333fdb8429 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.fir.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.fir.kt @@ -51,7 +51,7 @@ fun main(a: A) { a.field.length a.field = null - a.nonNullField?.length + a.nonNullField?.length a.nonNullField.length a.nonNullField = null } diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.kt index 96c0b1b8c23..07d898d2dde 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.kt @@ -51,7 +51,7 @@ fun main(a: A) { a.field.length a.field = null - a.nonNullField?.length + a.nonNullField?.length a.nonNullField.length a.nonNullField = null } diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/typeQualifierDefault/fieldsAreNullable.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/typeQualifierDefault/fieldsAreNullable.kt index 3e86cb6bd3a..6d0ac159677 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/typeQualifierDefault/fieldsAreNullable.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/typeQualifierDefault/fieldsAreNullable.kt @@ -52,7 +52,7 @@ fun main(a: A) { a.field.length a.field = null - a.nonNullField?.length + a.nonNullField?.length a.nonNullField.length a.nonNullField = null } diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/typeQualifierDefault/forceFlexibility.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/typeQualifierDefault/forceFlexibility.kt index c86d7811220..7b204e879a0 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/typeQualifierDefault/forceFlexibility.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/typeQualifierDefault/forceFlexibility.kt @@ -97,7 +97,7 @@ public class A { // FILE: main.kt fun main(a: A) { - a.foo("", null)?.length + a.foo("", null)?.length a.foo("", null).length a.foo(null, "").length diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/typeQualifierDefault/nullabilityFromOverridden.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/typeQualifierDefault/nullabilityFromOverridden.kt index 161417b87a5..ccfbbf3eacc 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/typeQualifierDefault/nullabilityFromOverridden.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/typeQualifierDefault/nullabilityFromOverridden.kt @@ -147,7 +147,7 @@ fun main(a: A, b: B, c: C) { c.foo2(null).length c.foo3(null).length c.bar1(null).length - c.bar1(null)?.length + c.bar1(null)?.length c.bar2(null).length c.baz(null).length } diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/typeQualifierDefault/overridingDefaultQualifier.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/typeQualifierDefault/overridingDefaultQualifier.kt index a463c62d578..998104a3ef7 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/typeQualifierDefault/overridingDefaultQualifier.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/typeQualifierDefault/overridingDefaultQualifier.kt @@ -127,7 +127,7 @@ public class A { // FILE: main.kt fun main(a: A, b: A.B, c: A.C) { - a.foo("", null)?.length + a.foo("", null)?.length a.foo("", null).length a.foo(null, "").length @@ -137,7 +137,7 @@ fun main(a: A, b: A.B, c: A.C) { a.bar().length a.bar()!!.length - a.field?.length + a.field?.length a.field.length a.baz().get(0) @@ -150,7 +150,7 @@ fun main(a: A, b: A.B, c: A.C) { b.foo(null, "").length b.foobar(null, "").length - b.foobar("", null)?.length + b.foobar("", null)?.length b.bar().length b.bar()!!.length @@ -163,7 +163,7 @@ fun main(a: A, b: A.B, c: A.C) { b.baz()!!.get(0)?.get(0) // c - c.foo("", null)?.length + c.foo("", null)?.length c.foo("", null).length c.foo(null, "").length diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/typeQualifierDefault/springNullable.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/typeQualifierDefault/springNullable.kt index 240a53aa0e9..e9929448649 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/typeQualifierDefault/springNullable.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/typeQualifierDefault/springNullable.kt @@ -64,7 +64,7 @@ public class A { // FILE: main.kt fun main(a: A) { - a.foo("", null)?.length + a.foo("", null)?.length a.foo("", null).length a.foo(null, "").length diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/typeQualifierDefault/springNullablePackage.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/typeQualifierDefault/springNullablePackage.kt index b105523e154..03d43aad519 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/typeQualifierDefault/springNullablePackage.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/typeQualifierDefault/springNullablePackage.kt @@ -70,7 +70,7 @@ public class A { // FILE: main.kt fun main(a: test.A) { - a.foo("", null)?.length + a.foo("", null)?.length a.foo("", null).length a.foo(null, "").length diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47833.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47833.kt index 35f386ff5e0..af9632c3177 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47833.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47833.kt @@ -1,5 +1,7 @@ // FIR_IDENTICAL +// SKIP_TXT // FILE: main.kt + sealed class ClientBootResult object ClientBootSuccess : ClientBootResult() diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47833.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47833.txt deleted file mode 100644 index c53177d8c4c..00000000000 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47833.txt +++ /dev/null @@ -1,35 +0,0 @@ -package - -public fun example(): Single - -public sealed class ClientBootResult { - protected constructor ClientBootResult() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public object ClientBootSuccess : ClientBootResult { - private constructor ClientBootSuccess() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -@FunctionalInterface /* annotation class not found */ public interface Function { - public abstract fun apply(/*0*/ t: T!): R! - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public open class Single { - public constructor Single() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - @io.reactivex.rxjava3.annotations.NonNull public final fun map(/*0*/ @io.reactivex.rxjava3.annotations.NonNull mapper: @io.reactivex.rxjava3.annotations.NonNull Function!): @io.reactivex.rxjava3.annotations.NonNull Single! - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - - // Static members - @io.reactivex.rxjava3.annotations.NonNull public open fun just(/*0*/ item: T!): @io.reactivex.rxjava3.annotations.NonNull Single! -} diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47920.fir.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47920.fir.kt index baaede4d2a9..1db54b20b14 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47920.fir.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47920.fir.kt @@ -1,4 +1,5 @@ // MUTE_FOR_PSI_CLASS_FILES_READING +// SKIP_TXT // FILE: J1.java import io.reactivex.rxjava3.annotations.*; diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47920.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47920.kt index 613eb2259c5..aa920319afc 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47920.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47920.kt @@ -1,4 +1,5 @@ // MUTE_FOR_PSI_CLASS_FILES_READING +// SKIP_TXT // FILE: J1.java import io.reactivex.rxjava3.annotations.*; diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47920.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47920.txt deleted file mode 100644 index fbe2791cdfe..00000000000 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/kt47920.txt +++ /dev/null @@ -1,10 +0,0 @@ -package - -public fun main(): kotlin.Unit - -public open class J1 { - public constructor J1() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/lombokSimple.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/lombokSimple.kt index 283f73f83f2..43be1c1b000 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/lombokSimple.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/lombokSimple.kt @@ -15,6 +15,6 @@ public class A { // FILE: main.kt fun main(a: A) { a.foo("").length - a.foo("")?.length - a.foo(null)?.length + a.foo("")?.length + a.foo(null)?.length } diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/rxjava.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/rxjava.txt index d7355e89103..2858461cae3 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/rxjava.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/rxjava.txt @@ -12,3 +12,4 @@ public open class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/rxjava3Errors.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/rxjava3Errors.txt index a1d116b7cb4..a75787a32bc 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/rxjava3Errors.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/rxjava3Errors.txt @@ -12,3 +12,4 @@ public open class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/nativeTests/identifiers.kt b/compiler/testData/diagnostics/nativeTests/identifiers.kt index 941e92cbc7b..d2f9fde42b5 100644 --- a/compiler/testData/diagnostics/nativeTests/identifiers.kt +++ b/compiler/testData/diagnostics/nativeTests/identifiers.kt @@ -3,66 +3,66 @@ // FIXME: rename identifiers.kt // FILE: 1.kt -package `check.pkg` +package `check.pkg` // FILE: 2.kt package totally.normal.pkg -class `Check.Class` +class `Check.Class` class NormalClass { - fun `check$member`() {} + fun `check$member`() {} } -object `Check;Object` +object `Check;Object` object NormalObject -data class Pair(val first: Int, val `next,one`: Int) +data class Pair(val first: Int, val `next,one`: Int) object Delegate { operator fun getValue(thisRef: Any?, property: kotlin.reflect.KProperty<*>): Any? = null } -fun `check(function`() { - val `check)variable` = 1 - val `check[delegated[variable` by Delegate +fun `check(function`() { + val `check)variable` = 1 + val `check[delegated[variable` by Delegate val normalVariable = 2 val normalDelegatedVariable by Delegate - val (check, `destructuring]declaration`) = Pair(1, 2) + val (check, `destructuring]declaration`) = Pair(1, 2) } fun normalFunction() {} -val `check{property` = 1 -val `check}delegated}property` by Delegate +val `check{property` = 1 +val `check}delegated}property` by Delegate val normalProperty = 2 val normalDelegatedProperty by Delegate -fun checkValueParameter(`check/parameter`: Int) {} +fun checkValueParameter(`check/parameter`: Int) {} -fun <`check, normalTypeParameter> checkTypeParameter() {} +fun <`check, normalTypeParameter> checkTypeParameter() {} -enum class `Check>Enum>Entry` { - `CHECK:ENUM:ENTRY`; +enum class `Check>Enum>Entry` { + `CHECK:ENUM:ENTRY`; } -typealias `check\typealias` = Any +typealias `check\typealias` = Any -fun `check&`() {} +fun `check&`() {} -fun `check~`() {} +fun `check~`() {} -fun `check*`() {} +fun `check*`() {} -fun `check?`() {} +fun `check?`() {} -fun `check#`() {} +fun `check#`() {} -fun `check|`() {} +fun `check|`() {} -fun `check§`() {} +fun `check§`() {} -fun `check%`() {} +fun `check%`() {} -fun `check@`() {} +fun `check@`() {} diff --git a/compiler/testData/diagnostics/tests/Bounds.kt b/compiler/testData/diagnostics/tests/Bounds.kt index 2efca46f280..b6c3a1a2f22 100644 --- a/compiler/testData/diagnostics/tests/Bounds.kt +++ b/compiler/testData/diagnostics/tests/Bounds.kt @@ -6,7 +6,7 @@ package boundsWithSubstitutors class C : A() val a = B() - val a1 = B<Int>() + val a1 = B<Int>() class X() diff --git a/compiler/testData/diagnostics/tests/ExtensionCallInvoke.fir.kt b/compiler/testData/diagnostics/tests/ExtensionCallInvoke.fir.kt index 45362d60550..01e89d765f6 100644 --- a/compiler/testData/diagnostics/tests/ExtensionCallInvoke.fir.kt +++ b/compiler/testData/diagnostics/tests/ExtensionCallInvoke.fir.kt @@ -1,6 +1,6 @@ fun bar(doIt: Int.() -> Int) { 1.doIt() - 1?.doIt() + 1?.doIt() val i: Int? = 1 i.doIt() i?.doIt() diff --git a/compiler/testData/diagnostics/tests/ExtensionCallInvoke.kt b/compiler/testData/diagnostics/tests/ExtensionCallInvoke.kt index 319c944ec43..857cc14579d 100644 --- a/compiler/testData/diagnostics/tests/ExtensionCallInvoke.kt +++ b/compiler/testData/diagnostics/tests/ExtensionCallInvoke.kt @@ -1,6 +1,6 @@ fun bar(doIt: Int.() -> Int) { 1.doIt() - 1?.doIt() + 1?.doIt() val i: Int? = 1 i.doIt() i?.doIt() diff --git a/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.fir.kt b/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.fir.kt index abc8ebf2126..5c8fb1bbd09 100644 --- a/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.fir.kt +++ b/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.fir.kt @@ -82,6 +82,6 @@ fun test() { val i : Int? = null i.(fun Int.() = 1)(); {}() - 1?.(fun Int.() = 1)() + 1?.(fun Int.() = 1)() 1.{}() } diff --git a/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.kt b/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.kt index e7b41586489..03c630f7405 100644 --- a/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.kt +++ b/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.kt @@ -82,6 +82,6 @@ fun test() { val i : Int? = null i.(fun Int.() = 1)(); {}() - 1?.(fun Int.() = 1)() + 1?.(fun Int.() = 1)() 1.{}() } diff --git a/compiler/testData/diagnostics/tests/SafeCallInvoke.fir.kt b/compiler/testData/diagnostics/tests/SafeCallInvoke.fir.kt index 9f56be3b417..6c2e3c5ee59 100644 --- a/compiler/testData/diagnostics/tests/SafeCallInvoke.fir.kt +++ b/compiler/testData/diagnostics/tests/SafeCallInvoke.fir.kt @@ -18,6 +18,6 @@ fun foo() { // these both also ok (with smart cast / unnecessary safe call) if (rule != null) { rule.apply() - rule?.apply() + rule?.apply() } } diff --git a/compiler/testData/diagnostics/tests/SafeCallInvoke.kt b/compiler/testData/diagnostics/tests/SafeCallInvoke.kt index ecdbe7290ff..e9ff20d41fb 100644 --- a/compiler/testData/diagnostics/tests/SafeCallInvoke.kt +++ b/compiler/testData/diagnostics/tests/SafeCallInvoke.kt @@ -18,6 +18,6 @@ fun foo() { // these both also ok (with smart cast / unnecessary safe call) if (rule != null) { rule.apply() - rule?.apply() + rule?.apply() } } diff --git a/compiler/testData/diagnostics/tests/SafeCallNonNullReceiver2.kt b/compiler/testData/diagnostics/tests/SafeCallNonNullReceiver2.kt index d012fb45b56..175c3f3fb71 100644 --- a/compiler/testData/diagnostics/tests/SafeCallNonNullReceiver2.kt +++ b/compiler/testData/diagnostics/tests/SafeCallNonNullReceiver2.kt @@ -3,5 +3,5 @@ fun ff() { val i: Int = 1 - val a: Int? = i?.plus(2) + val a: Int? = i?.plus(2) } diff --git a/compiler/testData/diagnostics/tests/SafeCallNonNullReceiverReturnNull.fir.kt b/compiler/testData/diagnostics/tests/SafeCallNonNullReceiverReturnNull.fir.kt index 117a93ca8fc..095029e7c7b 100644 --- a/compiler/testData/diagnostics/tests/SafeCallNonNullReceiverReturnNull.fir.kt +++ b/compiler/testData/diagnostics/tests/SafeCallNonNullReceiverReturnNull.fir.kt @@ -2,5 +2,5 @@ fun Int.gg() = null fun ff() { val a: Int = 1 - val b: Int = a?.gg() + val b: Int = a?.gg() } diff --git a/compiler/testData/diagnostics/tests/SafeCallNonNullReceiverReturnNull.kt b/compiler/testData/diagnostics/tests/SafeCallNonNullReceiverReturnNull.kt index 41fbbbc7d68..fe6d5efeeed 100644 --- a/compiler/testData/diagnostics/tests/SafeCallNonNullReceiverReturnNull.kt +++ b/compiler/testData/diagnostics/tests/SafeCallNonNullReceiverReturnNull.kt @@ -2,5 +2,5 @@ fun Int.gg() = null fun ff() { val a: Int = 1 - val b: Int = a?.gg() + val b: Int = a?.gg() } diff --git a/compiler/testData/diagnostics/tests/SafeCallOnFakePackage.kt b/compiler/testData/diagnostics/tests/SafeCallOnFakePackage.kt index 3e2a82a1317..e4d456dc634 100644 --- a/compiler/testData/diagnostics/tests/SafeCallOnFakePackage.kt +++ b/compiler/testData/diagnostics/tests/SafeCallOnFakePackage.kt @@ -12,5 +12,5 @@ val s: String = "test" fun ff() { val a = Test?.FOO val b = foo?.s - System?.out.println(a + b) + System?.out.println(a + b) } diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt b/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt index 046ad99b2d1..f86bfd264cd 100644 --- a/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt +++ b/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt @@ -33,7 +33,7 @@ fun test6() {} annotation class AnnArray(val a: Array) -@AnnArray(*["/"]) +@AnnArray(*["/"]) fun testArray() {} @Ann1([""]) diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCallInReceiver.fir.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCallInReceiver.fir.kt index 9c57d7dffa8..a2290e8bfea 100644 --- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCallInReceiver.fir.kt +++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCallInReceiver.fir.kt @@ -5,7 +5,7 @@ fun test11() { fun test12() { fun Any.bar(i: Int) {} - todo()?.bar(1) + todo()?.bar(1) } fun todo(): Nothing = throw Exception() diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCallInReceiver.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCallInReceiver.kt index a46be5c0f7a..1eced8b3d3d 100644 --- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCallInReceiver.kt +++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCallInReceiver.kt @@ -5,7 +5,7 @@ fun test11() { fun test12() { fun Any.bar(i: Int) {} - todo()?.bar(1) + todo()?.bar(1) } fun todo(): Nothing = throw Exception() diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/recursiveType.kt b/compiler/testData/diagnostics/tests/delegatedProperty/recursiveType.kt index dfaf11099d0..4d7671d7e83 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/recursiveType.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/recursiveType.kt @@ -3,7 +3,7 @@ import kotlin.reflect.KProperty -val a by a +val a by a val b by Delegate(b) diff --git a/compiler/testData/diagnostics/tests/delegation/kt44843.kt b/compiler/testData/diagnostics/tests/delegation/kt44843.kt index 45664958627..4a0a90db138 100644 --- a/compiler/testData/diagnostics/tests/delegation/kt44843.kt +++ b/compiler/testData/diagnostics/tests/delegation/kt44843.kt @@ -7,7 +7,7 @@ val bar2 by bar2() package lt.neworld.compiler class Foo { - val bar by bar() + val bar by bar() } // FILE: lt/neworld/compiler/bar/Bar.kt diff --git a/compiler/testData/diagnostics/tests/delegation/kt49477.kt b/compiler/testData/diagnostics/tests/delegation/kt49477.kt index 75283ef72b1..2efb3cc60fd 100644 --- a/compiler/testData/diagnostics/tests/delegation/kt49477.kt +++ b/compiler/testData/diagnostics/tests/delegation/kt49477.kt @@ -24,7 +24,7 @@ infix fun filter(filter: (R, Any?) -> Boolean): Delegate } class GitLabChangesProcessor: DatabaseEntity { - var buildProcessors by >"), TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_WARNING!>child_many( + var buildProcessors by >"), TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR!>child_many( GitLabBuildProcessor::class.java, GitLabBuildProcessor::processor ) @@ -32,4 +32,4 @@ class GitLabChangesProcessor: DatabaseEntity { fun Self.child_many( clazz: Class, property: KProperty1, name: String = property.name -): Delegate> = TODO() // Type checking has run into a recursive problem. Easiest workaround: specify types of your declarations explicitly \ No newline at end of file +): Delegate> = TODO() // Type checking has run into a recursive problem. Easiest workaround: specify types of your declarations explicitly diff --git a/compiler/testData/diagnostics/tests/exposed/propertyInSimpleConstructor.fir.kt b/compiler/testData/diagnostics/tests/exposed/propertyInSimpleConstructor.fir.kt index e6c862d2bdb..0be75d21778 100644 --- a/compiler/testData/diagnostics/tests/exposed/propertyInSimpleConstructor.fir.kt +++ b/compiler/testData/diagnostics/tests/exposed/propertyInSimpleConstructor.fir.kt @@ -1,3 +1,3 @@ private enum class Foo { A, B } -class Bar(val foo: Foo) +class Bar(val foo: Foo) diff --git a/compiler/testData/diagnostics/tests/exposed/simple.fir.kt b/compiler/testData/diagnostics/tests/exposed/simple.fir.kt index 05d808a89da..b02eb73cb09 100644 --- a/compiler/testData/diagnostics/tests/exposed/simple.fir.kt +++ b/compiler/testData/diagnostics/tests/exposed/simple.fir.kt @@ -6,7 +6,7 @@ public interface Your: My { fun foo(): T } -public class DerivedMy>(val x: My): Base() { +public class DerivedMy>(val x: My): Base() { constructor(xx: My?, x: My): this(xx ?: x) diff --git a/compiler/testData/diagnostics/tests/extensions/ExtensionFunctions.fir.kt b/compiler/testData/diagnostics/tests/extensions/ExtensionFunctions.fir.kt index 80b6904629f..a9b5aef4c75 100644 --- a/compiler/testData/diagnostics/tests/extensions/ExtensionFunctions.fir.kt +++ b/compiler/testData/diagnostics/tests/extensions/ExtensionFunctions.fir.kt @@ -9,7 +9,7 @@ fun T.foo(x : E, y : A) : T { y plus 1 y + 1.0 - this?.minus(this) + this?.minus(this) return this } @@ -69,7 +69,7 @@ import outer.* command?.equals1(null) val c = Command() - c?.equals2(null) + c?.equals2(null) if (command == null) 1 } diff --git a/compiler/testData/diagnostics/tests/extensions/ExtensionFunctions.kt b/compiler/testData/diagnostics/tests/extensions/ExtensionFunctions.kt index f77c4e784fa..507b6089e85 100644 --- a/compiler/testData/diagnostics/tests/extensions/ExtensionFunctions.kt +++ b/compiler/testData/diagnostics/tests/extensions/ExtensionFunctions.kt @@ -9,7 +9,7 @@ fun T.foo(x : E, y : A) : T { y plus 1 y + 1.0 - this?.minus(this) + this?.minus(this) return this } @@ -69,7 +69,7 @@ import outer.* command?.equals1(null) val c = Command() - c?.equals2(null) + c?.equals2(null) if (command == null) 1 } diff --git a/compiler/testData/diagnostics/tests/functionLiterals/kt11733_1.txt b/compiler/testData/diagnostics/tests/functionLiterals/kt11733_1.txt index 0451082b357..e80958b0045 100644 --- a/compiler/testData/diagnostics/tests/functionLiterals/kt11733_1.txt +++ b/compiler/testData/diagnostics/tests/functionLiterals/kt11733_1.txt @@ -9,3 +9,4 @@ public interface Predicate { public abstract operator fun invoke(/*0*/ @org.jetbrains.annotations.NotNull t: T): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/tests/generics/Projections.kt b/compiler/testData/diagnostics/tests/generics/Projections.kt index ca5ac18e5b2..98a5af54ad7 100644 --- a/compiler/testData/diagnostics/tests/generics/Projections.kt +++ b/compiler/testData/diagnostics/tests/generics/Projections.kt @@ -20,7 +20,7 @@ class Inv() { fun testInOut() { In().f("1"); (null as In<in String>).f("1") - (null as In<*>).f("1") // Wrong Arg + (null as In<*>).f("1") // Wrong Arg In().f(1); (null as In<in String>).f(1) diff --git a/compiler/testData/diagnostics/tests/generics/kt9985.fir.kt b/compiler/testData/diagnostics/tests/generics/kt9985.fir.kt deleted file mode 100644 index eb05f9fbb21..00000000000 --- a/compiler/testData/diagnostics/tests/generics/kt9985.fir.kt +++ /dev/null @@ -1,46 +0,0 @@ -// !CHECK_TYPE -// Incorrect "type mismatch" error for generic extension safe call (required not-null, found nullable) - -// FILE: B.java - -public class B { - public String gav() { - return ""; - } - - public static B create() { - return new B(); - } -} - -// FILE: A.kt - -class A { - fun gav() = "" -} -fun foo(x: R) = x -fun A.bar() = "" -fun B.bar() = "" - -fun foo(l: A?) { - // No errors should be here - foo(l?.bar()) checkType { _() } - foo(l?.gav()) checkType { _() } - if (l != null) { - foo(l?.bar()) checkType { _() } - foo(l?.gav()) checkType { _() } - } -} - -fun fooNotNull(l: A) { - // No errors should be here - foo(l?.bar()) checkType { _() } - foo(l?.gav()) checkType { _() } -} - -fun bar() { - val l = B.create() - foo(l?.bar()) checkType { _() } - foo(l?.gav()) checkType { _() } -} - diff --git a/compiler/testData/diagnostics/tests/generics/kt9985.kt b/compiler/testData/diagnostics/tests/generics/kt9985.kt index 340c611e5cc..ab8f274841e 100644 --- a/compiler/testData/diagnostics/tests/generics/kt9985.kt +++ b/compiler/testData/diagnostics/tests/generics/kt9985.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !CHECK_TYPE // Incorrect "type mismatch" error for generic extension safe call (required not-null, found nullable) @@ -27,15 +28,15 @@ fun foo(l: A?) { foo(l?.bar()) checkType { _() } foo(l?.gav()) checkType { _() } if (l != null) { - foo(l?.bar()) checkType { _() } - foo(l?.gav()) checkType { _() } + foo(l?.bar()) checkType { _() } + foo(l?.gav()) checkType { _() } } } fun fooNotNull(l: A) { // No errors should be here - foo(l?.bar()) checkType { _() } - foo(l?.gav()) checkType { _() } + foo(l?.bar()) checkType { _() } + foo(l?.gav()) checkType { _() } } fun bar() { @@ -43,4 +44,3 @@ fun bar() { foo(l?.bar()) checkType { _() } foo(l?.gav()) checkType { _() } } - diff --git a/compiler/testData/diagnostics/tests/generics/nullability/smartCasts.fir.kt b/compiler/testData/diagnostics/tests/generics/nullability/smartCasts.fir.kt index 6fb0d498dc2..8416ac4ba83 100644 --- a/compiler/testData/diagnostics/tests/generics/nullability/smartCasts.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/nullability/smartCasts.fir.kt @@ -12,7 +12,7 @@ fun foo(x: T) { if (x != null) {} x.length - x?.length + x?.length x.bar1() x.bar2() @@ -20,14 +20,14 @@ fun foo(x: T) { x.bar4() - x?.bar1() + x?.bar1() } x.length if (x is String) { x.length - x?.length + x?.length x.bar1() x.bar2() @@ -36,7 +36,7 @@ fun foo(x: T) { if (x is CharSequence) { x.length - x?.length + x?.length x.bar1() x.bar2() diff --git a/compiler/testData/diagnostics/tests/generics/nullability/smartCasts.kt b/compiler/testData/diagnostics/tests/generics/nullability/smartCasts.kt index 8acb23906f1..341ff82d766 100644 --- a/compiler/testData/diagnostics/tests/generics/nullability/smartCasts.kt +++ b/compiler/testData/diagnostics/tests/generics/nullability/smartCasts.kt @@ -12,7 +12,7 @@ fun foo(x: T) { if (x != null) {} x.length - x?.length + x?.length x.bar1() x.bar2() @@ -20,14 +20,14 @@ fun foo(x: T) { x.bar4() - x?.bar1() + x?.bar1() } x.length if (x is String) { x.length - x?.length + x?.length x.bar1() x.bar2() @@ -36,7 +36,7 @@ fun foo(x: T) { if (x is CharSequence) { x.length - x?.length + x?.length x.bar1() x.bar2() diff --git a/compiler/testData/diagnostics/tests/generics/nullability/smartCastsOnThis.fir.kt b/compiler/testData/diagnostics/tests/generics/nullability/smartCastsOnThis.fir.kt index e41ab6b3863..991c8abe51c 100644 --- a/compiler/testData/diagnostics/tests/generics/nullability/smartCastsOnThis.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/nullability/smartCastsOnThis.fir.kt @@ -11,7 +11,7 @@ fun T.foo() { if (this != null) {} length - this?.length + this?.length bar1() bar2() @@ -19,14 +19,14 @@ fun T.foo() { bar4() - this?.bar1() + this?.bar1() } length if (this is String) { length - this?.length + this?.length bar1() bar2() diff --git a/compiler/testData/diagnostics/tests/generics/nullability/smartCastsOnThis.kt b/compiler/testData/diagnostics/tests/generics/nullability/smartCastsOnThis.kt index 6e26a2a2d3e..7c1ee10f311 100644 --- a/compiler/testData/diagnostics/tests/generics/nullability/smartCastsOnThis.kt +++ b/compiler/testData/diagnostics/tests/generics/nullability/smartCastsOnThis.kt @@ -11,7 +11,7 @@ fun T.foo() { if (this != null) {} length - this?.length + this?.length bar1() bar2() @@ -19,14 +19,14 @@ fun T.foo() { bar4() - this?.bar1() + this?.bar1() } length if (this is String) { length - this?.length + this?.length bar1() bar2() diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/typeParameterBounds.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/typeParameterBounds.kt index da3c5bfd356..2fb01b55793 100644 --- a/compiler/testData/diagnostics/tests/generics/projectionsScope/typeParameterBounds.kt +++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/typeParameterBounds.kt @@ -20,7 +20,7 @@ fun foo2(a: A, b: A) { a.foo2(Inv()) a.foo2(Inv()) - a.foo2<Inv>(Inv()) + a.foo2<Inv>(Inv()) a.foo3(In()) a.foo3(In()) @@ -32,7 +32,7 @@ fun foo2(a: A, b: A) { b.foo2(Inv()) b.foo2(Inv()) - b.foo2<Inv>(Inv()) + b.foo2<Inv>(Inv()) b.foo3(In()) diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/memberScope.kt b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/memberScope.kt index 38fa69d0d03..137af28d325 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/memberScope.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/memberScope.kt @@ -57,13 +57,13 @@ fun test() { if (get() === null) {} if (x != null) { - x?.hashCode() - x?.equals(1) + x?.hashCode() + x?.equals(1) x.equals("") x.hashCode() x.toString() x.test() - x?.test2() + x?.test2() x.test2() } diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/nullability.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/nullability.fir.kt index cdbf32e3c34..f328fcb7cf1 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/nullability.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/nullability.fir.kt @@ -25,36 +25,36 @@ fun build4(x: R2, @BuilderInference block: TestInterface.() -> fun test(a: String?) { val ret1 = build { emit(1) - get()?.equals("") + get()?.equals("") val x = get() - x?.equals("") + x?.equals("") x ?: 1 x!! "" } val ret2 = build2 { emit(1) - get()?.equals("") + get()?.equals("") val x = get() - x?.equals("") + x?.equals("") x ?: 1 x!! "" } val ret3 = build3 { emit(1) - get()?.equals("") + get()?.equals("") val x = get() - x?.equals("") + x?.equals("") x ?: 1 x!! "" } val ret4 = build4(1) { emit(1) - get()?.equals("") + get()?.equals("") val x = get() - x?.equals("") + x?.equals("") x ?: 1 x!! "" diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/nullability.kt b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/nullability.kt index cc25939f31a..a2d9c8296c2 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/nullability.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/nullability.kt @@ -34,27 +34,27 @@ fun test(a: String?) { } val ret2 = build2 { emit(1) - get()?.equals("") + get()?.equals("") val x = get() - x?.equals("") + x?.equals("") x ?: 1 x!! "" } val ret3 = build3 { emit(1) - get()?.equals("") + get()?.equals("") val x = get() - x?.equals("") + x?.equals("") x ?: 1 x!! "" } val ret4 = build4(1) { emit(1) - get()?.equals("") + get()?.equals("") val x = get() - x?.equals("") + x?.equals("") x ?: 1 x!! "" diff --git a/compiler/testData/diagnostics/tests/inference/capturedTypes/kt46727Warnings.txt b/compiler/testData/diagnostics/tests/inference/capturedTypes/kt46727Warnings.txt index 80a677bd0a8..ae01fe093f1 100644 --- a/compiler/testData/diagnostics/tests/inference/capturedTypes/kt46727Warnings.txt +++ b/compiler/testData/diagnostics/tests/inference/capturedTypes/kt46727Warnings.txt @@ -60,3 +60,4 @@ public open class Foo3 { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/tests/inference/completion/postponedArgumentsAnalysis/basic.kt b/compiler/testData/diagnostics/tests/inference/completion/postponedArgumentsAnalysis/basic.kt index 15be9d5dec5..642ef541461 100644 --- a/compiler/testData/diagnostics/tests/inference/completion/postponedArgumentsAnalysis/basic.kt +++ b/compiler/testData/diagnostics/tests/inference/completion/postponedArgumentsAnalysis/basic.kt @@ -155,7 +155,7 @@ fun main() { select(id(id(fun(x: String, y: String) { }), fun String.(x: String) {}), { x, y -> x }) val x26: Int.(String) -> Int = fun (x: String) = 10 // it must be error, see KT-38439 // Receiver must be specified in anonymous function declaration - val x27: Int.(String) -> Int = id(fun (x: String) = 10) + val x27: Int.(String) -> Int = id(fun (x: String) = 10) select(id Unit> {}, { x: Int, y: String -> x }) // Inferring lambda parameter types by partially specified parameter types of other lambdas diff --git a/compiler/testData/diagnostics/tests/inference/constraints/definitelyNotNullTypeInReturnPosition.txt b/compiler/testData/diagnostics/tests/inference/constraints/definitelyNotNullTypeInReturnPosition.txt index 35f47211e72..bed2d0a0577 100644 --- a/compiler/testData/diagnostics/tests/inference/constraints/definitelyNotNullTypeInReturnPosition.txt +++ b/compiler/testData/diagnostics/tests/inference/constraints/definitelyNotNullTypeInReturnPosition.txt @@ -116,8 +116,8 @@ public final class Main { public constructor Main(/*0*/ x: L?, /*1*/ y: L) public final val vx01: Foo> public final val vx02: Foo> - public final val vx11: OutBar>> - public final val vx12: OutBar>> + public final val vx11: OutBar>> + public final val vx12: OutBar>> public final val vx21: OutBar>> public final val vx22: OutBar>> public final val x00: Bar @@ -128,12 +128,12 @@ public final class Main { public final val x11: Foo> public final val x110: Bar public final val x111: Bar - public final val x12: Foo> - public final val x120: Bar - public final val x121: Bar + public final val x12: Foo> + public final val x120: Bar + public final val x121: Bar public final val x122: Bar public final val x123: Bar - public final val x13: Foo> + public final val x13: Foo> public final val x133: Bar public final val x135: Bar public final val x137: Bar @@ -146,8 +146,8 @@ public final class Main { public final val x154: Bar public final val x161: Bar public final val x162: Bar - public final val x163: Bar - public final val x164: Bar + public final val x163: Bar + public final val x164: Bar public final val x170: Bar public final val x171: Bar public final val x180: [ERROR : ] @@ -164,24 +164,24 @@ public final class Main { public final val x231: Foo>> public final val x240: Foo>> public final val x241: Foo>> - public final val x250: Bar - public final val x251: Bar - public final val x260: Foo>> - public final val x261: Foo>> + public final val x250: Bar + public final val x251: Bar + public final val x260: Foo>> + public final val x261: Foo>> public final val x270: Foo>> public final val x271: Foo>> - public final val x280: OutBar>> - public final val x281: OutBar>> + public final val x280: OutBar>> + public final val x281: OutBar>> public final val x290: OutBar>> public final val x291: OutBar>> public final val x30: Foo> - public final val x300: OutBar>> - public final val x301: OutBar>> + public final val x300: OutBar>> + public final val x301: OutBar>> public final val x31: Foo> - public final val x310: Bar - public final val x311: Bar - public final val x320: OutBar - public final val x321: OutBar + public final val x310: OutBarAliasUseSite /* = Bar */ + public final val x311: OutBarAliasUseSite /* = Bar */ + public final val x320: OutBarAliasDecSite /* = OutBar */ + public final val x321: OutBarAliasDecSite /* = OutBar */ public final val x330: OutBar>> public final val x331: OutBar>> public final val x340: OutBar>> @@ -212,15 +212,15 @@ public final class Main { public final val x451: OutBar>> public final val x460: Bar>> public final val x461: Bar>> - public final val x470: OutBar>> - public final val x471: OutBar>> + public final val x470: OutBar>> + public final val x471: OutBar>> public final val x480: Bar public final val x481: Bar public final val x482: Bar public final val x50: Bar public final val x51: Bar - public final val x60: OutBar - public final val x61: OutBar + public final val x60: OutBar + public final val x61: OutBar public final val x70: InBar public final val x71: InBar public final val x80: Foo> diff --git a/compiler/testData/diagnostics/tests/inference/findViewById.fir.kt b/compiler/testData/diagnostics/tests/inference/findViewById.fir.kt index 719357b9e42..79e20e83328 100644 --- a/compiler/testData/diagnostics/tests/inference/findViewById.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/findViewById.fir.kt @@ -54,5 +54,5 @@ fun test2(t: Test?) { val xSafeCallSafeCastExplicitType = t?.findViewById(0) as? X val xSafeCallCast = t?.findViewById(0) as X - val xSafeCallCastExplicitType = t?.findViewById(0) as X + val xSafeCallCastExplicitType = t?.findViewById(0) as X } diff --git a/compiler/testData/diagnostics/tests/inference/findViewById.kt b/compiler/testData/diagnostics/tests/inference/findViewById.kt index 10029825be3..3ab2d546c51 100644 --- a/compiler/testData/diagnostics/tests/inference/findViewById.kt +++ b/compiler/testData/diagnostics/tests/inference/findViewById.kt @@ -54,5 +54,5 @@ fun test2(t: Test?) { val xSafeCallSafeCastExplicitType = t?.findViewById(0) as? X val xSafeCallCast = t?.findViewById(0) as X - val xSafeCallCastExplicitType = t?.findViewById(0) as X + val xSafeCallCastExplicitType = t?.findViewById(0) as X } diff --git a/compiler/testData/diagnostics/tests/inference/kt47316.kt b/compiler/testData/diagnostics/tests/inference/kt47316.kt index 72c88dd57ab..f881ef0e15d 100644 --- a/compiler/testData/diagnostics/tests/inference/kt47316.kt +++ b/compiler/testData/diagnostics/tests/inference/kt47316.kt @@ -30,7 +30,7 @@ fun String.asFsdAddress(): String { fun box(): String { val state = Test().state if (state is GoBuildingRunningState<*>) { - state.buildingWorkingDirectory.asFsdAddress() + state.buildingWorkingDirectory.asFsdAddress() } return "OK" } diff --git a/compiler/testData/diagnostics/tests/inference/kt6175.kt b/compiler/testData/diagnostics/tests/inference/kt6175.kt index 530b25cba2a..df1eafbeb89 100644 --- a/compiler/testData/diagnostics/tests/inference/kt6175.kt +++ b/compiler/testData/diagnostics/tests/inference/kt6175.kt @@ -29,7 +29,7 @@ fun test3() { baz { true } - baz { x -> + baz { x -> true } } @@ -40,7 +40,7 @@ fun test4() { brr { true } - brr { x -> + brr { x -> true } } diff --git a/compiler/testData/diagnostics/tests/inference/nestedCalls/makeNullableIfSafeCall.fir.kt b/compiler/testData/diagnostics/tests/inference/nestedCalls/makeNullableIfSafeCall.fir.kt new file mode 100644 index 00000000000..9cf3ded584c --- /dev/null +++ b/compiler/testData/diagnostics/tests/inference/nestedCalls/makeNullableIfSafeCall.fir.kt @@ -0,0 +1,41 @@ +package a + +interface A { + val b: B + val nb: B? +} + +interface B { + fun foo(): Int +} + +fun test(u: A?, x: A?, y: A?, z: A?, w: A, v: A?) { + u?.b?.foo()!! // was UNNECESSARY_SAFE_CALL everywhere, because result type (of 'foo()') wasn't made nullable + u!!.b?.foo()!! + x?.b!!.foo()!! + // x?.b is not null + x!!.b!!.foo()!! + + y?.nb?.foo()!! + y!!.nb?.foo()!! + z?.nb!!.foo()!! + // z?.nb is not null + z!!.nb!!.foo()!! + + w.b?.foo()!! + w.b!!.foo()!! + w.nb?.foo()!! + w.nb!!.foo()!! + + v!!.b.foo()!! +} + +fun B?.bar(): Int = 1 +fun B?.baz(): Int? = 1 + +fun doInt(i: Int) = i + +fun test(a: A?) { + doInt(a?.b.bar()!!) + doInt(a?.b.baz()!!) +} diff --git a/compiler/testData/diagnostics/tests/inference/nestedCalls/makeNullableIfSafeCall.kt b/compiler/testData/diagnostics/tests/inference/nestedCalls/makeNullableIfSafeCall.kt index a6fbc013fc0..73aee4ee6c0 100644 --- a/compiler/testData/diagnostics/tests/inference/nestedCalls/makeNullableIfSafeCall.kt +++ b/compiler/testData/diagnostics/tests/inference/nestedCalls/makeNullableIfSafeCall.kt @@ -1,4 +1,3 @@ -// FIR_IDENTICAL package a interface A { @@ -12,7 +11,7 @@ interface B { fun test(u: A?, x: A?, y: A?, z: A?, w: A, v: A?) { u?.b?.foo()!! // was UNNECESSARY_SAFE_CALL everywhere, because result type (of 'foo()') wasn't made nullable - u!!.b?.foo()!! + u!!.b?.foo()!! x?.b!!.foo()!! // x?.b is not null x!!.b!!.foo()!! @@ -23,7 +22,7 @@ fun test(u: A?, x: A?, y: A?, z: A?, w: A, v: A?) { // z?.nb is not null z!!.nb!!.foo()!! - w.b?.foo()!! + w.b?.foo()!! w.b!!.foo()!! w.nb?.foo()!! w.nb!!.foo()!! diff --git a/compiler/testData/diagnostics/tests/inference/publicApproximation/smartCastInLambdaReturnAfterIntersection.kt b/compiler/testData/diagnostics/tests/inference/publicApproximation/smartCastInLambdaReturnAfterIntersection.kt index ce2fac3f379..46e590ac2eb 100644 --- a/compiler/testData/diagnostics/tests/inference/publicApproximation/smartCastInLambdaReturnAfterIntersection.kt +++ b/compiler/testData/diagnostics/tests/inference/publicApproximation/smartCastInLambdaReturnAfterIntersection.kt @@ -18,5 +18,5 @@ fun smartCastAfterIntersection(a: One, b: Two) = run { } fun test(one: One, two: Two) { - smartCastAfterIntersection(one, two)?.base() + smartCastAfterIntersection(one, two)?.base() } diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt702.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt702.kt index da2543b7ff9..f6fc14ee964 100644 --- a/compiler/testData/diagnostics/tests/inference/regressions/kt702.kt +++ b/compiler/testData/diagnostics/tests/inference/regressions/kt702.kt @@ -10,7 +10,7 @@ public class Throwables() { public fun propagateIfInstanceOf(throwable : Throwable?, declaredType : Class?) : Unit { if (((throwable != null) && declaredType?.isInstance(throwable)!!)) { - throw declaredType?.cast(throwable)!! + throw declaredType?.cast(throwable)!! } } public fun propagateIfPossible(throwable : Throwable?) : Unit { diff --git a/compiler/testData/diagnostics/tests/inference/selectOfLambdaWithExtension.fir.kt b/compiler/testData/diagnostics/tests/inference/selectOfLambdaWithExtension.fir.kt deleted file mode 100644 index 3dd73cd47bb..00000000000 --- a/compiler/testData/diagnostics/tests/inference/selectOfLambdaWithExtension.fir.kt +++ /dev/null @@ -1,20 +0,0 @@ -// SKIP_TXT - -typealias A = CharSequence.(Int) -> Unit - -var w: Int = 1 - -fun myPrint(x: Int) {} - -fun select(vararg x: T) = x[0] - -val a1: A = select( - { a: Int -> myPrint(a + this.length + 1) }, - { a: Int -> myPrint(a + this.length + 2) } -) - -val a2 = select( - { a: Int -> myPrint(a + this.length + 1) }, - fun CharSequence.(a: Int) { myPrint(a + this.length + 2) }, - { a: Int -> myPrint(a + this.length + 3) } -) diff --git a/compiler/testData/diagnostics/tests/inference/selectOfLambdaWithExtension.kt b/compiler/testData/diagnostics/tests/inference/selectOfLambdaWithExtension.kt index 2a1d0c96c28..5815056609c 100644 --- a/compiler/testData/diagnostics/tests/inference/selectOfLambdaWithExtension.kt +++ b/compiler/testData/diagnostics/tests/inference/selectOfLambdaWithExtension.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // SKIP_TXT typealias A = CharSequence.(Int) -> Unit @@ -9,12 +10,12 @@ fun myPrint(x: Int) {} fun select(vararg x: T) = x[0] val a1: A = select( - { a: Int -> myPrint(a + this.length + 1) }, + { a: Int -> myPrint(a + this.length + 1) }, { a: Int -> myPrint(a + this.length + 2) } ) val a2 = select( - { a: Int -> myPrint(a + this.length + 1) }, + { a: Int -> myPrint(a + this.length + 1) }, fun CharSequence.(a: Int) { myPrint(a + this.length + 2) }, - { a: Int -> myPrint(a + this.length + 3) } + { a: Int -> myPrint(a + this.length + 3) } ) diff --git a/compiler/testData/diagnostics/tests/inlineClasses/inlineClassCannotImplementInterfaceByDelegation.fir.kt b/compiler/testData/diagnostics/tests/inlineClasses/inlineClassCannotImplementInterfaceByDelegation.fir.kt index e389a728b36..73911c24351 100644 --- a/compiler/testData/diagnostics/tests/inlineClasses/inlineClassCannotImplementInterfaceByDelegation.fir.kt +++ b/compiler/testData/diagnostics/tests/inlineClasses/inlineClassCannotImplementInterfaceByDelegation.fir.kt @@ -6,4 +6,4 @@ object FooImpl : IFoo inline class Test1(val x: Any) : IFoo by FooImpl -inline class Test2(val x: IFoo) : IFoo by x +inline class Test2(val x: IFoo) : IFoo by x diff --git a/compiler/testData/diagnostics/tests/inlineClasses/inlineClassCannotImplementInterfaceByDelegation.kt b/compiler/testData/diagnostics/tests/inlineClasses/inlineClassCannotImplementInterfaceByDelegation.kt index 7a20bfab1b0..5fcdc27e416 100644 --- a/compiler/testData/diagnostics/tests/inlineClasses/inlineClassCannotImplementInterfaceByDelegation.kt +++ b/compiler/testData/diagnostics/tests/inlineClasses/inlineClassCannotImplementInterfaceByDelegation.kt @@ -6,4 +6,4 @@ object FooImpl : IFoo inline class Test1(val x: Any) : IFoo by FooImpl -inline class Test2(val x: IFoo) : IFoo by x \ No newline at end of file +inline class Test2(val x: IFoo) : IFoo by x diff --git a/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-SpecialTypes.txt b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-SpecialTypes.txt index 36a7d15e23f..97cb19078c5 100644 --- a/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-SpecialTypes.txt +++ b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-SpecialTypes.txt @@ -26,3 +26,4 @@ public open class Y : X { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-UserTypes.txt b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-UserTypes.txt index 41e58c4393a..9cfb4bb45b8 100644 --- a/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-UserTypes.txt +++ b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-UserTypes.txt @@ -26,3 +26,4 @@ public open class Y : X { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/tests/j+k/integerNotNullable.txt b/compiler/testData/diagnostics/tests/j+k/integerNotNullable.txt index 2d0dee46257..003b0799fdf 100644 --- a/compiler/testData/diagnostics/tests/j+k/integerNotNullable.txt +++ b/compiler/testData/diagnostics/tests/j+k/integerNotNullable.txt @@ -18,3 +18,4 @@ public open class IntBox : Box { @java.lang.Override public open override /*1*/ fun put(/*0*/ @org.jetbrains.annotations.NotNull t: kotlin.Int): kotlin.Unit public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/tests/j+k/kt2619.kt b/compiler/testData/diagnostics/tests/j+k/kt2619.kt index fe7f286ffc8..20445a9c216 100644 --- a/compiler/testData/diagnostics/tests/j+k/kt2619.kt +++ b/compiler/testData/diagnostics/tests/j+k/kt2619.kt @@ -3,7 +3,7 @@ // FILE: foo.kt fun main() { val c: Type - when (c) { + when (c) { } } diff --git a/compiler/testData/diagnostics/tests/j+k/specialBuiltIns/securityProvider.kt b/compiler/testData/diagnostics/tests/j+k/specialBuiltIns/securityProvider.kt index 7849c5231ec..39125a93077 100644 --- a/compiler/testData/diagnostics/tests/j+k/specialBuiltIns/securityProvider.kt +++ b/compiler/testData/diagnostics/tests/j+k/specialBuiltIns/securityProvider.kt @@ -1,5 +1,6 @@ // FIR_IDENTICAL // FULL_JDK +// SKIP_TXT import java.security.Provider diff --git a/compiler/testData/diagnostics/tests/j+k/specialBuiltIns/securityProvider.txt b/compiler/testData/diagnostics/tests/j+k/specialBuiltIns/securityProvider.txt index 9db2d67d928..e69de29bb2d 100644 --- a/compiler/testData/diagnostics/tests/j+k/specialBuiltIns/securityProvider.txt +++ b/compiler/testData/diagnostics/tests/j+k/specialBuiltIns/securityProvider.txt @@ -1,114 +0,0 @@ -package - -public final class Example : java.security.Provider { - public constructor Example() - invisible_fake final override /*1*/ /*fake_override*/ var count: kotlin.Int - protected/*protected and package*/ final override /*1*/ /*fake_override*/ var defaults: java.util.Properties! - public open override /*1*/ /*fake_override*/ val entries: kotlin.collections.MutableSet> - invisible_fake final override /*1*/ /*fake_override*/ var entrySet: kotlin.collections.(Mutable)Set!>! - invisible_fake final override /*1*/ /*fake_override*/ var entrySetCallCount: kotlin.Int - invisible_fake final override /*1*/ /*fake_override*/ var info: kotlin.String! - invisible_fake final override /*1*/ /*fake_override*/ var initialized: kotlin.Boolean - invisible_fake final override /*1*/ /*fake_override*/ var keySet: kotlin.collections.(Mutable)Set! - public open override /*1*/ /*fake_override*/ val keys: kotlin.collections.MutableSet - invisible_fake final override /*1*/ /*fake_override*/ var legacyChanged: kotlin.Boolean - invisible_fake final override /*1*/ /*fake_override*/ var legacyMap: kotlin.collections.(Mutable)Map! - invisible_fake final override /*1*/ /*fake_override*/ var legacyStrings: kotlin.collections.(Mutable)Map! - invisible_fake final override /*1*/ /*fake_override*/ var loadFactor: kotlin.Float - invisible_fake final override /*1*/ /*fake_override*/ var modCount: kotlin.Int - invisible_fake final override /*1*/ /*fake_override*/ var name: kotlin.String! - invisible_fake final override /*1*/ /*fake_override*/ var serviceMap: kotlin.collections.(Mutable)Map! - invisible_fake final override /*1*/ /*fake_override*/ var serviceSet: kotlin.collections.(Mutable)Set! - invisible_fake final override /*1*/ /*fake_override*/ var servicesChanged: kotlin.Boolean - public open override /*1*/ /*fake_override*/ val size: kotlin.Int - invisible_fake final override /*1*/ /*fake_override*/ var table: kotlin.Array<(out) java.util.Hashtable.Entry<*, *>!>! - invisible_fake final override /*1*/ /*fake_override*/ var threshold: kotlin.Int - invisible_fake final override /*1*/ /*fake_override*/ var values: kotlin.collections.(Mutable)Collection! - public open override /*1*/ /*fake_override*/ val values: kotlin.collections.MutableCollection - invisible_fake final override /*1*/ /*fake_override*/ var version: kotlin.Double - invisible_fake open override /*1*/ /*fake_override*/ fun addEntry(/*0*/ p0: kotlin.Int, /*1*/ p1: kotlin.Any!, /*2*/ p2: kotlin.Any!, /*3*/ p3: kotlin.Int): kotlin.Unit - invisible_fake open override /*1*/ /*fake_override*/ fun check(/*0*/ p0: kotlin.String!): kotlin.Unit - invisible_fake open override /*1*/ /*fake_override*/ fun checkInitialized(): kotlin.Unit - invisible_fake open override /*1*/ /*fake_override*/ fun checkLegacy(/*0*/ p0: kotlin.Any!): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun clear(): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun clone(): kotlin.Any - public open override /*1*/ /*fake_override*/ fun compute(/*0*/ p0: kotlin.Any!, /*1*/ p1: java.util.function.BiFunction): kotlin.Any? - public open override /*1*/ /*fake_override*/ fun computeIfAbsent(/*0*/ p0: kotlin.Any!, /*1*/ p1: java.util.function.Function): kotlin.Any! - public open override /*1*/ /*fake_override*/ fun computeIfPresent(/*0*/ p0: kotlin.Any!, /*1*/ p1: java.util.function.BiFunction): kotlin.Any? - public open override /*1*/ /*fake_override*/ fun contains(/*0*/ p0: kotlin.Any!): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun containsKey(/*0*/ key: kotlin.Any!): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun containsValue(/*0*/ value: kotlin.Any!): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun elements(): java.util.Enumeration! - invisible_fake open override /*1*/ /*fake_override*/ fun ensureLegacyParsed(): kotlin.Unit - invisible_fake open override /*1*/ /*fake_override*/ fun enumerate(/*0*/ p0: java.util.Hashtable!): kotlin.Unit - invisible_fake open override /*1*/ /*fake_override*/ fun enumerateStringProperties(/*0*/ p0: java.util.Hashtable!): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun forEach(/*0*/ p0: java.util.function.BiConsumer): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun get(/*0*/ key: kotlin.Any!): kotlin.Any? - invisible_fake open override /*1*/ /*fake_override*/ fun getEnumeration(/*0*/ p0: kotlin.Int): java.util.Enumeration! - public open override /*1*/ /*fake_override*/ fun getInfo(): kotlin.String! - invisible_fake open override /*1*/ /*fake_override*/ fun getIterator(/*0*/ p0: kotlin.Int): kotlin.collections.(Mutable)Iterator! - public open override /*1*/ /*fake_override*/ fun getName(): kotlin.String! - public open override /*1*/ /*fake_override*/ fun getOrDefault(/*0*/ key: kotlin.Any!, /*1*/ defaultValue: kotlin.Any!): kotlin.Any! - public open override /*1*/ /*fake_override*/ fun getProperty(/*0*/ p0: kotlin.String!): kotlin.String! - public open override /*1*/ /*fake_override*/ fun getProperty(/*0*/ p0: kotlin.String!, /*1*/ p1: kotlin.String!): kotlin.String! - public open override /*1*/ /*fake_override*/ fun getService(/*0*/ p0: kotlin.String!, /*1*/ p1: kotlin.String!): java.security.Provider.Service! - public open override /*1*/ /*fake_override*/ fun getServices(): kotlin.collections.(Mutable)Set! - invisible_fake open override /*1*/ /*fake_override*/ fun getTypeAndAlgorithm(/*0*/ p0: kotlin.String!): kotlin.Array<(out) kotlin.String!>! - public open override /*1*/ /*fake_override*/ fun getVersion(): kotlin.Double - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - invisible_fake open override /*1*/ /*fake_override*/ fun implClear(): kotlin.Unit - invisible_fake open override /*1*/ /*fake_override*/ fun implCompute(/*0*/ p0: kotlin.Any!, /*1*/ p1: java.util.function.BiFunction!): kotlin.Any! - invisible_fake open override /*1*/ /*fake_override*/ fun implComputeIfAbsent(/*0*/ p0: kotlin.Any!, /*1*/ p1: java.util.function.Function!): kotlin.Any! - invisible_fake open override /*1*/ /*fake_override*/ fun implComputeIfPresent(/*0*/ p0: kotlin.Any!, /*1*/ p1: java.util.function.BiFunction!): kotlin.Any! - invisible_fake open override /*1*/ /*fake_override*/ fun implMerge(/*0*/ p0: kotlin.Any!, /*1*/ p1: kotlin.Any!, /*2*/ p2: java.util.function.BiFunction!): kotlin.Any! - invisible_fake open override /*1*/ /*fake_override*/ fun implPut(/*0*/ p0: kotlin.Any!, /*1*/ p1: kotlin.Any!): kotlin.Any! - invisible_fake open override /*1*/ /*fake_override*/ fun implPutAll(/*0*/ p0: kotlin.collections.(Mutable)Map<*, *>!): kotlin.Unit - invisible_fake open override /*1*/ /*fake_override*/ fun implPutIfAbsent(/*0*/ p0: kotlin.Any!, /*1*/ p1: kotlin.Any!): kotlin.Any! - invisible_fake open override /*1*/ /*fake_override*/ fun implRemove(/*0*/ p0: kotlin.Any!): kotlin.Any! - invisible_fake open override /*1*/ /*fake_override*/ fun implRemove(/*0*/ p0: kotlin.Any!, /*1*/ p1: kotlin.Any!): kotlin.Boolean - invisible_fake open override /*1*/ /*fake_override*/ fun implRemoveService(/*0*/ p0: java.security.Provider.Service!): kotlin.Unit - invisible_fake open override /*1*/ /*fake_override*/ fun implReplace(/*0*/ p0: kotlin.Any!, /*1*/ p1: kotlin.Any!): kotlin.Any! - invisible_fake open override /*1*/ /*fake_override*/ fun implReplace(/*0*/ p0: kotlin.Any!, /*1*/ p1: kotlin.Any!, /*2*/ p2: kotlin.Any!): kotlin.Boolean - invisible_fake open override /*1*/ /*fake_override*/ fun implReplaceAll(/*0*/ p0: java.util.function.BiFunction!): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun keys(): java.util.Enumeration! - public open override /*1*/ /*fake_override*/ fun list(/*0*/ p0: java.io.PrintStream!): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun list(/*0*/ p0: java.io.PrintWriter!): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun load(/*0*/ p0: java.io.InputStream!): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun load(/*0*/ p0: java.io.Reader!): kotlin.Unit - invisible_fake open override /*1*/ /*fake_override*/ fun load0(/*0*/ p0: java.util.Properties.LineReader!): kotlin.Unit - invisible_fake open override /*1*/ /*fake_override*/ fun loadConvert(/*0*/ p0: kotlin.CharArray!, /*1*/ p1: kotlin.Int, /*2*/ p2: kotlin.Int, /*3*/ p3: kotlin.CharArray!): kotlin.String! - public open override /*1*/ /*fake_override*/ fun loadFromXML(/*0*/ p0: java.io.InputStream!): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun merge(/*0*/ p0: kotlin.Any!, /*1*/ p1: kotlin.Any, /*2*/ p2: java.util.function.BiFunction): kotlin.Any? - invisible_fake open override /*1*/ /*fake_override*/ fun parseLegacyPut(/*0*/ p0: kotlin.String!, /*1*/ p1: kotlin.String!): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun propertyNames(): java.util.Enumeration<*>! - public open override /*1*/ /*fake_override*/ fun put(/*0*/ key: kotlin.Any!, /*1*/ value: kotlin.Any!): kotlin.Any? - public open override /*1*/ /*fake_override*/ fun putAll(/*0*/ from: kotlin.collections.Map<*, *>): kotlin.Unit - invisible_fake open override /*1*/ /*fake_override*/ fun putId(): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun putIfAbsent(/*0*/ p0: kotlin.Any!, /*1*/ p1: kotlin.Any!): kotlin.Any? - invisible_fake open override /*1*/ /*fake_override*/ fun putPropertyStrings(/*0*/ p0: java.security.Provider.Service!): kotlin.Unit - protected/*protected and package*/ open override /*1*/ /*fake_override*/ fun putService(/*0*/ p0: java.security.Provider.Service!): kotlin.Unit - invisible_fake open override /*1*/ /*fake_override*/ fun readObject(/*0*/ p0: java.io.ObjectInputStream!): kotlin.Unit - invisible_fake open override /*1*/ /*fake_override*/ fun reconstitutionPut(/*0*/ p0: kotlin.Array<(out) java.util.Hashtable.Entry<*, *>!>!, /*1*/ p1: kotlin.Any!, /*2*/ p2: kotlin.Any!): kotlin.Unit - protected/*protected and package*/ open override /*1*/ /*fake_override*/ fun rehash(): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.Any!): kotlin.Any? - public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.Any!, /*1*/ value: kotlin.Any!): kotlin.Boolean - invisible_fake open override /*1*/ /*fake_override*/ fun removeInvalidServices(/*0*/ p0: kotlin.collections.(Mutable)Map!): kotlin.Unit - invisible_fake open override /*1*/ /*fake_override*/ fun removePropertyStrings(/*0*/ p0: java.security.Provider.Service!): kotlin.Unit - protected/*protected and package*/ open override /*1*/ /*fake_override*/ fun removeService(/*0*/ p0: java.security.Provider.Service!): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun replace(/*0*/ p0: kotlin.Any!, /*1*/ p1: kotlin.Any!): kotlin.Any? - public open override /*1*/ /*fake_override*/ fun replace(/*0*/ p0: kotlin.Any!, /*1*/ p1: kotlin.Any!, /*2*/ p2: kotlin.Any!): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun replaceAll(/*0*/ p0: java.util.function.BiFunction): kotlin.Unit - @kotlin.Deprecated(message = "Deprecated in Java") public open override /*1*/ /*fake_override*/ fun save(/*0*/ p0: java.io.OutputStream!, /*1*/ p1: kotlin.String!): kotlin.Unit - invisible_fake open override /*1*/ /*fake_override*/ fun saveConvert(/*0*/ p0: kotlin.String!, /*1*/ p1: kotlin.Boolean, /*2*/ p2: kotlin.Boolean): kotlin.String! - public open override /*1*/ /*fake_override*/ fun setProperty(/*0*/ p0: kotlin.String!, /*1*/ p1: kotlin.String!): kotlin.Any! - public open override /*1*/ /*fake_override*/ fun store(/*0*/ p0: java.io.OutputStream!, /*1*/ p1: kotlin.String!): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun store(/*0*/ p0: java.io.Writer!, /*1*/ p1: kotlin.String!): kotlin.Unit - invisible_fake open override /*1*/ /*fake_override*/ fun store0(/*0*/ p0: java.io.BufferedWriter!, /*1*/ p1: kotlin.String!, /*2*/ p2: kotlin.Boolean): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun storeToXML(/*0*/ p0: java.io.OutputStream!, /*1*/ p1: kotlin.String!): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun storeToXML(/*0*/ p0: java.io.OutputStream!, /*1*/ p1: kotlin.String!, /*2*/ p2: kotlin.String!): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun stringPropertyNames(): kotlin.collections.(Mutable)Set! - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - invisible_fake open override /*1*/ /*fake_override*/ fun writeObject(/*0*/ p0: java.io.ObjectOutputStream!): kotlin.Unit -} diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsIndexMismatch.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsIndexMismatch.kt index 592252b04c7..4c5021cd508 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsIndexMismatch.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsIndexMismatch.kt @@ -30,6 +30,6 @@ import p.* fun test(b: B?) { if (b is C) { - b?.foo(null) + b?.foo(null) } } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classVsFunctionGenericsInParamsMismatch.fir.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classVsFunctionGenericsInParamsMismatch.fir.kt index fa2c74ea755..702ed9cbb7f 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classVsFunctionGenericsInParamsMismatch.fir.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classVsFunctionGenericsInParamsMismatch.fir.kt @@ -31,6 +31,6 @@ fun test(b: B?, c: C) { b?.foo(1, 1) c.foo(1, 1) if (b is C) { - b?.foo(1, 1) + b?.foo(1, 1) } } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classVsFunctionGenericsInParamsMismatch.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classVsFunctionGenericsInParamsMismatch.kt index dd69dfa6814..14586906ce5 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classVsFunctionGenericsInParamsMismatch.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classVsFunctionGenericsInParamsMismatch.kt @@ -31,6 +31,6 @@ fun test(b: B?, c: C) { b?.foo(1, 1) c.foo(1, 1) if (b is C) { - b?.foo(1, 1) + b?.foo(1, 1) } } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/covariantReturnTypes.fir.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/covariantReturnTypes.fir.kt index 4c0449c2d4d..c3df30c4c78 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/covariantReturnTypes.fir.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/covariantReturnTypes.fir.kt @@ -31,6 +31,6 @@ import p.* fun test(b: B?) { if (b is C) { - b?.getParent() + b?.getParent() } } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/covariantReturnTypes.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/covariantReturnTypes.kt index 6c905366840..f51728c8124 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/covariantReturnTypes.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/covariantReturnTypes.kt @@ -31,6 +31,6 @@ import p.* fun test(b: B?) { if (b is C) { - b?.getParent() + b?.getParent() } } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentNumberOfParams.fir.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentNumberOfParams.fir.kt index 45d56d782ef..3c5cd34f0cf 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentNumberOfParams.fir.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentNumberOfParams.fir.kt @@ -29,6 +29,6 @@ import p.* fun test(b: B?) { if (b is C) { - b?.foo(1, "") + b?.foo(1, "") } } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentNumberOfParams.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentNumberOfParams.kt index ae67c6eaf74..5bde00ee18a 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentNumberOfParams.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentNumberOfParams.kt @@ -29,6 +29,6 @@ import p.* fun test(b: B?) { if (b is C) { - b?.foo(1, "") + b?.foo(1, "") } } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/simpleWithInheritance.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/simpleWithInheritance.kt index c083e937b05..6cd0d5b6079 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/simpleWithInheritance.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/simpleWithInheritance.kt @@ -34,6 +34,6 @@ import p.* fun test(b: B?) { if (b is C && b is D) { - b?.getParent() + b?.getParent() } } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/substitutedGenericInParams.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/substitutedGenericInParams.kt index 6c0892cf9ec..d022450957c 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/substitutedGenericInParams.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/substitutedGenericInParams.kt @@ -30,6 +30,6 @@ import p.* fun test(b: B?) { if (b is C) { - b?.foo("") + b?.foo("") } } diff --git a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/ReceiverNullability.kt b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/ReceiverNullability.kt index 83e3b89f2e4..a28dba0f939 100644 --- a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/ReceiverNullability.kt +++ b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/ReceiverNullability.kt @@ -25,9 +25,9 @@ fun A.test2() { this.bar() this.buzz() - this?.foo() // warning - this?.bar() // warning - this?.buzz() // warning + this?.foo() // warning + this?.bar() // warning + this?.buzz() // warning } fun A?.test3() { diff --git a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/notnullTypesFromJavaWithSmartcast.txt b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/notnullTypesFromJavaWithSmartcast.txt index cb4e22e5c49..1fbff88cadc 100644 --- a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/notnullTypesFromJavaWithSmartcast.txt +++ b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/notnullTypesFromJavaWithSmartcast.txt @@ -11,3 +11,4 @@ public open class JClass { // Static members @org.jetbrains.annotations.NotNull public open fun getNotNullT(): T } + diff --git a/compiler/testData/diagnostics/tests/nullableTypes/definitelyNotNullWithNullableBound.kt b/compiler/testData/diagnostics/tests/nullableTypes/definitelyNotNullWithNullableBound.kt index 1ebe64dac54..1a6d16b087a 100644 --- a/compiler/testData/diagnostics/tests/nullableTypes/definitelyNotNullWithNullableBound.kt +++ b/compiler/testData/diagnostics/tests/nullableTypes/definitelyNotNullWithNullableBound.kt @@ -9,7 +9,7 @@ fun test(arg: N) { makeDefinitelyNotNull(arg)!! - makeDefinitelyNotNull(arg)?.toInt() + makeDefinitelyNotNull(arg)?.toInt() val nullImposible = when (val dnn = makeDefinitelyNotNull(arg)) { null -> false diff --git a/compiler/testData/diagnostics/tests/nullableTypes/safeCallOnTypeWithNullableUpperBound.fir.kt b/compiler/testData/diagnostics/tests/nullableTypes/safeCallOnTypeWithNullableUpperBound.fir.kt index c00cca26b54..848be3e88cc 100644 --- a/compiler/testData/diagnostics/tests/nullableTypes/safeCallOnTypeWithNullableUpperBound.fir.kt +++ b/compiler/testData/diagnostics/tests/nullableTypes/safeCallOnTypeWithNullableUpperBound.fir.kt @@ -1,13 +1,13 @@ fun test(t: T): String? { if (t != null) { - return t?.toString() + return t?.toString() } return t?.toString() } fun T.testThis(): String? { if (this != null) { - return this?.toString() + return this?.toString() } return this?.toString() } diff --git a/compiler/testData/diagnostics/tests/nullableTypes/safeCallOnTypeWithNullableUpperBound.kt b/compiler/testData/diagnostics/tests/nullableTypes/safeCallOnTypeWithNullableUpperBound.kt index 5f0e3ae7661..98814c13ba0 100644 --- a/compiler/testData/diagnostics/tests/nullableTypes/safeCallOnTypeWithNullableUpperBound.kt +++ b/compiler/testData/diagnostics/tests/nullableTypes/safeCallOnTypeWithNullableUpperBound.kt @@ -1,13 +1,13 @@ fun test(t: T): String? { if (t != null) { - return t?.toString() + return t?.toString() } return t?.toString() } fun T.testThis(): String? { if (this != null) { - return this?.toString() + return this?.toString() } return this?.toString() } diff --git a/compiler/testData/diagnostics/tests/nullableTypes/safeCallOperators.fir.kt b/compiler/testData/diagnostics/tests/nullableTypes/safeCallOperators.fir.kt index 6121d5990ff..4b3393dd8c8 100644 --- a/compiler/testData/diagnostics/tests/nullableTypes/safeCallOperators.fir.kt +++ b/compiler/testData/diagnostics/tests/nullableTypes/safeCallOperators.fir.kt @@ -52,40 +52,40 @@ fun foo(a: A?) { a?.w.inc() if (a != null) { - a?.l += 1 - a?.l[0] - a?.l[0]++ - a?.l[0] = 1 + a?.l += 1 + a?.l[0] + a?.l[0]++ + a?.l[0] = 1 - a?.ll[0][0] - a?.ll[0][0]++ - a?.ll[0][0] = 1 + a?.ll[0][0] + a?.ll[0][0]++ + a?.ll[0][0] = 1 // No warning is reported because // 1. All kinds of green code with safe+call + invoke we identified fails with CCE if `a != null`, anyway // 2. In case of null value, the behavior is intended (no call performed) - a?.q() - a?.w++ + a?.q() + a?.w++ - (a?.l) += 1 - (a?.l)[0] - (a?.l)[0]++ - (a?.l)[0] = 1 + (a?.l) += 1 + (a?.l)[0] + (a?.l)[0]++ + (a?.l)[0] = 1 - (a?.ll)[0][0] - (a?.ll)[0][0]++ - (a?.ll)[0][0] = 1 - (a?.q)() - (a?.w)++ + (a?.ll)[0][0] + (a?.ll)[0][0]++ + (a?.ll)[0][0] = 1 + (a?.q)() + (a?.w)++ - a?.l.plusAssign(1) - a?.l.get(0) - a?.l.get(0).inc() - a?.l.set(0, 1) + a?.l.plusAssign(1) + a?.l.get(0) + a?.l.get(0).inc() + a?.l.set(0, 1) - a?.ll.get(0).get(0) - a?.ll.get(0).get(0).inc() - a?.ll.get(0).set(0, 1) - a?.q.invoke() - a?.w.inc() + a?.ll.get(0).get(0) + a?.ll.get(0).get(0).inc() + a?.ll.get(0).set(0, 1) + a?.q.invoke() + a?.w.inc() } } diff --git a/compiler/testData/diagnostics/tests/nullableTypes/safeCallOperators.kt b/compiler/testData/diagnostics/tests/nullableTypes/safeCallOperators.kt index 15d32a9e2c5..03c2bfb7453 100644 --- a/compiler/testData/diagnostics/tests/nullableTypes/safeCallOperators.kt +++ b/compiler/testData/diagnostics/tests/nullableTypes/safeCallOperators.kt @@ -52,40 +52,40 @@ fun foo(a: A?) { a?.w.inc() if (a != null) { - a?.l += 1 - a?.l[0] - a?.l[0]++ - a?.l[0] = 1 + a?.l += 1 + a?.l[0] + a?.l[0]++ + a?.l[0] = 1 - a?.ll[0][0] - a?.ll[0][0]++ - a?.ll[0][0] = 1 + a?.ll[0][0] + a?.ll[0][0]++ + a?.ll[0][0] = 1 // No warning is reported because // 1. All kinds of green code with safe+call + invoke we identified fails with CCE if `a != null`, anyway // 2. In case of null value, the behavior is intended (no call performed) - a?.q() - a?.w++ + a?.q() + a?.w++ - (a?.l) += 1 - (a?.l)[0] - (a?.l)[0]++ - (a?.l)[0] = 1 + (a?.l) += 1 + (a?.l)[0] + (a?.l)[0]++ + (a?.l)[0] = 1 - (a?.ll)[0][0] - (a?.ll)[0][0]++ - (a?.ll)[0][0] = 1 - (a?.q)() - (a?.w)++ + (a?.ll)[0][0] + (a?.ll)[0][0]++ + (a?.ll)[0][0] = 1 + (a?.q)() + (a?.w)++ - a?.l.plusAssign(1) - a?.l.get(0) - a?.l.get(0).inc() - a?.l.set(0, 1) + a?.l.plusAssign(1) + a?.l.get(0) + a?.l.get(0).inc() + a?.l.set(0, 1) - a?.ll.get(0).get(0) - a?.ll.get(0).get(0).inc() - a?.ll.get(0).set(0, 1) - a?.q.invoke() - a?.w.inc() + a?.ll.get(0).get(0) + a?.ll.get(0).get(0).inc() + a?.ll.get(0).set(0, 1) + a?.q.invoke() + a?.w.inc() } } diff --git a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/enhancementFromAnnotation.txt b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/enhancementFromAnnotation.txt index 33c5fe77aeb..bb881f00323 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/enhancementFromAnnotation.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/enhancementFromAnnotation.txt @@ -27,3 +27,4 @@ public open class C : B, A { // Static members public open fun create(): C! } + diff --git a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/methodTypeParameter.txt b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/methodTypeParameter.txt index fa3821ed75a..3f4cca30294 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/methodTypeParameter.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/methodTypeParameter.txt @@ -12,3 +12,4 @@ public open class A { public open fun bar(/*0*/ @org.jetbrains.annotations.NotNull x: T, /*1*/ y: T!): kotlin.Unit public open fun platformString(): kotlin.String! } + diff --git a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceReturnType.kt b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceReturnType.kt index 4f7c52442b6..c0654a53dee 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceReturnType.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceReturnType.kt @@ -19,6 +19,6 @@ public class A { // FILE: k.kt fun test() { - A.create().bar()?.length - A().bar()?.length + A.create().bar()?.length + A().bar()?.length } diff --git a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceReturnType.txt b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceReturnType.txt index 7390bd2d320..64edc3f5ee9 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceReturnType.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceReturnType.txt @@ -12,3 +12,4 @@ public open class A { // Static members public open fun create(): A! } + diff --git a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceValueParameter.txt b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceValueParameter.txt index 2b47ef4e8a1..bd3338f8537 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceValueParameter.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceValueParameter.txt @@ -12,3 +12,4 @@ public open class A { // Static members public open fun create(): A! } + diff --git a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/onTypeProjection.kt b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/onTypeProjection.kt index 56c9e327429..88acff1c928 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/onTypeProjection.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/onTypeProjection.kt @@ -15,6 +15,6 @@ public class A { // FILE: k.kt fun test(a: A) { - a.bar()?.length - a.bar()?.length + a.bar()?.length + a.bar()?.length } diff --git a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/onTypeProjection.txt b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/onTypeProjection.txt index 74ae9249cf5..67869d53f25 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/onTypeProjection.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/onTypeProjection.txt @@ -9,3 +9,4 @@ public open class A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/substitutionInSuperType.txt b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/substitutionInSuperType.txt index 56f090e8661..563b922256e 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/substitutionInSuperType.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/substitutionInSuperType.txt @@ -42,3 +42,4 @@ public final class C2 : A { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/elvis.txt b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/elvis.txt index 0536635b974..93dcb4a4670 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/elvis.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/elvis.txt @@ -17,3 +17,4 @@ public open class J { @org.jetbrains.annotations.Nullable public open fun getNAny(): T? @org.jetbrains.annotations.NotNull public open fun getNNAny(): T } + diff --git a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/notNullTypeMarkedWithNullableAnnotation.kt b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/notNullTypeMarkedWithNullableAnnotation.kt index 85f4af1785b..1151d252d14 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/notNullTypeMarkedWithNullableAnnotation.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/notNullTypeMarkedWithNullableAnnotation.kt @@ -14,7 +14,7 @@ public class J { fun list(j: J): Any { val a = j.n()!! - a?.get(0) + a?.get(0) if (a == null) {} a!! diff --git a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/safeCall.kt b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/safeCall.kt index 75c39873754..33936d30be9 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/safeCall.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/safeCall.kt @@ -25,20 +25,20 @@ fun test() { // platform type with no annotation val platformJ = J.staticJ - platformNN?.foo() + platformNN?.foo() platformN?.foo() platformJ?.foo() if (platformNN != null) { - platformNN?.foo() + platformNN?.foo() } if (platformN != null) { - platformN?.foo() + platformN?.foo() } if (platformJ != null) { - platformJ?.foo() + platformJ?.foo() } } diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/typeEnhancement.txt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/typeEnhancement.txt index 24448c48475..4b45fcf5a01 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/typeEnhancement.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/typeEnhancement.txt @@ -28,3 +28,4 @@ public/*package*/ open class Test { // Static members public/*package*/ final var rawField: A<(raw) kotlin.Any!>! } + diff --git a/compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/saveAnnotationAfterSubstitution.txt b/compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/saveAnnotationAfterSubstitution.txt index 03b45a1e3a3..dd20ff26b56 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/saveAnnotationAfterSubstitution.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/saveAnnotationAfterSubstitution.txt @@ -49,3 +49,4 @@ public interface C3 : B1 { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/tests/reassignment/when.kt b/compiler/testData/diagnostics/tests/reassignment/when.kt index 1e4eac0a127..6abf3debad1 100644 --- a/compiler/testData/diagnostics/tests/reassignment/when.kt +++ b/compiler/testData/diagnostics/tests/reassignment/when.kt @@ -4,7 +4,7 @@ fun foo(f: Boolean): Int { val i: Int - when (f) { + when (f) { true -> i = 1 } i = 3 diff --git a/compiler/testData/diagnostics/tests/regressions/Jet72.kt b/compiler/testData/diagnostics/tests/regressions/Jet72.kt index 16a4f674ac4..40a26b74d45 100644 --- a/compiler/testData/diagnostics/tests/regressions/Jet72.kt +++ b/compiler/testData/diagnostics/tests/regressions/Jet72.kt @@ -14,7 +14,7 @@ fun test(room : Object) { for(item: Item? in items) { if (item?.room === room) { // item?.room is not null - System.out.println("You see " + item?.name) + System.out.println("You see " + item?.name) } } } diff --git a/compiler/testData/diagnostics/tests/regressions/SpecififcityByReceiver.fir.kt b/compiler/testData/diagnostics/tests/regressions/SpecififcityByReceiver.fir.kt index 5f567c77779..4c822ec5d50 100644 --- a/compiler/testData/diagnostics/tests/regressions/SpecififcityByReceiver.fir.kt +++ b/compiler/testData/diagnostics/tests/regressions/SpecififcityByReceiver.fir.kt @@ -4,6 +4,6 @@ fun main() { val command : Any = 1 - command?.equals(null) + command?.equals(null) command.equals(null) } diff --git a/compiler/testData/diagnostics/tests/regressions/SpecififcityByReceiver.kt b/compiler/testData/diagnostics/tests/regressions/SpecififcityByReceiver.kt index 1a3d9877951..d92a28606b5 100644 --- a/compiler/testData/diagnostics/tests/regressions/SpecififcityByReceiver.kt +++ b/compiler/testData/diagnostics/tests/regressions/SpecififcityByReceiver.kt @@ -4,6 +4,6 @@ fun main() { val command : Any = 1 - command?.equals(null) + command?.equals(null) command.equals(null) } diff --git a/compiler/testData/diagnostics/tests/regressions/kt701.kt b/compiler/testData/diagnostics/tests/regressions/kt701.kt index 61b3b150de6..8860c02a21c 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt701.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt701.kt @@ -7,7 +7,7 @@ public class Throwables() { public fun propagateIfInstanceOf(throwable : Throwable?, declaredType : Class?) { if (((throwable != null) && declaredType?.isInstance(throwable)!!)) { - throw declaredType?.cast(throwable)!! + throw declaredType?.cast(throwable)!! } } public fun propagateIfPossible(throwable : Throwable?) { diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/kt30695_2.fir.kt b/compiler/testData/diagnostics/tests/resolve/invoke/kt30695_2.fir.kt index 8e779cbf925..9b4e568670f 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/kt30695_2.fir.kt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/kt30695_2.fir.kt @@ -31,7 +31,7 @@ fun testNullableReceiver(nullable: Cls?) { fun testNotNullableReceiver(notNullable: Cls) { notNullable.nullableExtensionProperty() - notNullable?.extensionProperty() + notNullable?.extensionProperty() } fun testFlexibleReceiver() { diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/kt30695_2.kt b/compiler/testData/diagnostics/tests/resolve/invoke/kt30695_2.kt index 22668159eae..5480498728d 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/kt30695_2.kt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/kt30695_2.kt @@ -31,7 +31,7 @@ fun testNullableReceiver(nullable: Cls?) { fun testNotNullableReceiver(notNullable: Cls) { notNullable.nullableExtensionProperty() - notNullable?.extensionProperty() + notNullable?.extensionProperty() } fun testFlexibleReceiver() { diff --git a/compiler/testData/diagnostics/tests/resolve/overloadConflicts/genericWithProjection.kt b/compiler/testData/diagnostics/tests/resolve/overloadConflicts/genericWithProjection.kt index 2a33eb00bf6..da35c6941ab 100644 --- a/compiler/testData/diagnostics/tests/resolve/overloadConflicts/genericWithProjection.kt +++ b/compiler/testData/diagnostics/tests/resolve/overloadConflicts/genericWithProjection.kt @@ -7,5 +7,5 @@ class In() { fun test1(x: In): Unit = x.f("1") fun test2(x: In): Unit = x.f("1") -fun test3(x: In<out String>): Unit = x.f("1") -fun test4(x: In<*>): Unit = x.f("1") \ No newline at end of file +fun test3(x: In<out String>): Unit = x.f("1") +fun test4(x: In<*>): Unit = x.f("1") diff --git a/compiler/testData/diagnostics/tests/samConversions/kt17765.fir.kt b/compiler/testData/diagnostics/tests/samConversions/kt17765.fir.kt deleted file mode 100644 index 580d35ef758..00000000000 --- a/compiler/testData/diagnostics/tests/samConversions/kt17765.fir.kt +++ /dev/null @@ -1,12 +0,0 @@ -// FILE: Test.java -public class Test { - interface MyRunnable extends Runnable {} - - public static void foo(MyRunnable r) {} - public static void foo(Runnable r) {} -} - -// FILE: 1.kt -fun main(args: Array) { - Test.foo { } -} diff --git a/compiler/testData/diagnostics/tests/samConversions/kt17765.kt b/compiler/testData/diagnostics/tests/samConversions/kt17765.kt index 98843cc2bca..45301889e16 100644 --- a/compiler/testData/diagnostics/tests/samConversions/kt17765.kt +++ b/compiler/testData/diagnostics/tests/samConversions/kt17765.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FILE: Test.java public class Test { interface MyRunnable extends Runnable {} @@ -8,5 +9,5 @@ public class Test { // FILE: 1.kt fun main(args: Array) { - Test.foo { } + Test.foo { } } diff --git a/compiler/testData/diagnostics/tests/sealed/privateTypeInConstructor.fir.kt b/compiler/testData/diagnostics/tests/sealed/privateTypeInConstructor.fir.kt index 40dc61ab284..66a16aa2a3e 100644 --- a/compiler/testData/diagnostics/tests/sealed/privateTypeInConstructor.fir.kt +++ b/compiler/testData/diagnostics/tests/sealed/privateTypeInConstructor.fir.kt @@ -4,13 +4,13 @@ private class Bar sealed class SealedFoo( - val x: Bar, + val x: Bar, private val y: Bar, z: Bar ) abstract class AbstractFoo( - val x: Bar, + val x: Bar, private val y: Bar, z: Bar ) diff --git a/compiler/testData/diagnostics/tests/sealed/privateTypeInConstructor.kt b/compiler/testData/diagnostics/tests/sealed/privateTypeInConstructor.kt index 09cc0ad17c0..dc88fec1999 100644 --- a/compiler/testData/diagnostics/tests/sealed/privateTypeInConstructor.kt +++ b/compiler/testData/diagnostics/tests/sealed/privateTypeInConstructor.kt @@ -4,7 +4,7 @@ private class Bar sealed class SealedFoo( - val x: Bar, + val x: Bar, private val y: Bar, z: Bar ) diff --git a/compiler/testData/diagnostics/tests/smartCasts/propertyAsCondition.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/propertyAsCondition.fir.kt index 59212d7bf61..97077cede4b 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/propertyAsCondition.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/propertyAsCondition.fir.kt @@ -8,7 +8,7 @@ fun foo(my: My) { if (my.x != null) { // my.x should be smart-cast if (my.x) doIt() - when (my.x) { + when (my.x) { true -> doIt() } when { @@ -21,7 +21,7 @@ fun bar(x: Boolean?) { if (x != null) { // x should be smart-cast if (x) doIt() - when (x) { + when (x) { true -> doIt() } when { diff --git a/compiler/testData/diagnostics/tests/smartCasts/propertyAsCondition.kt b/compiler/testData/diagnostics/tests/smartCasts/propertyAsCondition.kt index a630589fcfb..4c31d52e398 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/propertyAsCondition.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/propertyAsCondition.kt @@ -8,7 +8,7 @@ fun foo(my: My) { if (my.x != null) { // my.x should be smart-cast if (my.x) doIt() - when (my.x) { + when (my.x) { true -> doIt() } when { @@ -21,7 +21,7 @@ fun bar(x: Boolean?) { if (x != null) { // x should be smart-cast if (x) doIt() - when (x) { + when (x) { true -> doIt() } when { diff --git a/compiler/testData/diagnostics/tests/smartCasts/safecalls/nullableReceiverWithExclExcl.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/safecalls/nullableReceiverWithExclExcl.fir.kt index e4b6af8564b..483d02dedc5 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/safecalls/nullableReceiverWithExclExcl.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/safecalls/nullableReceiverWithExclExcl.fir.kt @@ -5,7 +5,7 @@ fun test(foo: Foo?) { // Correct foo.bar?.length // Unnecessary - foo?.bar?.length + foo?.bar?.length } - foo.bar?.length + foo.bar?.length } diff --git a/compiler/testData/diagnostics/tests/smartCasts/safecalls/nullableReceiverWithExclExcl.kt b/compiler/testData/diagnostics/tests/smartCasts/safecalls/nullableReceiverWithExclExcl.kt index 8a81e2d2076..9d3287363d1 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/safecalls/nullableReceiverWithExclExcl.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/safecalls/nullableReceiverWithExclExcl.kt @@ -5,7 +5,7 @@ fun test(foo: Foo?) { // Correct foo.bar?.length // Unnecessary - foo?.bar?.length + foo?.bar?.length } foo.bar?.length } diff --git a/compiler/testData/diagnostics/tests/targetedBuiltIns/forEachRemainingNullability.kt b/compiler/testData/diagnostics/tests/targetedBuiltIns/forEachRemainingNullability.kt index 5aa5e1180a2..1c06c87e3de 100644 --- a/compiler/testData/diagnostics/tests/targetedBuiltIns/forEachRemainingNullability.kt +++ b/compiler/testData/diagnostics/tests/targetedBuiltIns/forEachRemainingNullability.kt @@ -36,7 +36,7 @@ fun foo(x: Iterator, y: Iterator) { x.forEachRemaining(null) x.forEachRemaining { it -> it.length } - x.forEachRemaining { it -> it?.length } + x.forEachRemaining { it -> it?.length } y.forEachRemaining { it -> it.length } y.forEachRemaining { it -> it?.length } } diff --git a/compiler/testData/diagnostics/tests/testsWithJava17/sealedClasses/javaSealedInterfaceExhaustiveness.txt b/compiler/testData/diagnostics/tests/testsWithJava17/sealedClasses/javaSealedInterfaceExhaustiveness.txt index 6b88bec8277..448f96962bd 100644 --- a/compiler/testData/diagnostics/tests/testsWithJava17/sealedClasses/javaSealedInterfaceExhaustiveness.txt +++ b/compiler/testData/diagnostics/tests/testsWithJava17/sealedClasses/javaSealedInterfaceExhaustiveness.txt @@ -57,4 +57,4 @@ public final enum class E : kotlin.Enum, Base { // Static members public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): E public final /*synthesized*/ fun values(): kotlin.Array -} +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/typealias/boundsViolationInDeepTypeAliasExpansion.kt b/compiler/testData/diagnostics/tests/typealias/boundsViolationInDeepTypeAliasExpansion.kt index ad38c5b85db..7ae8cec917e 100644 --- a/compiler/testData/diagnostics/tests/typealias/boundsViolationInDeepTypeAliasExpansion.kt +++ b/compiler/testData/diagnostics/tests/typealias/boundsViolationInDeepTypeAliasExpansion.kt @@ -13,4 +13,4 @@ fun test4(x: TC2>() val test6 = TC2>() val test7 = TC2>() -val test8 = TC2List>() +val test8 = TC2List>() diff --git a/compiler/testData/diagnostics/tests/typealias/boundsViolationInTypeAliasExpansion.kt b/compiler/testData/diagnostics/tests/typealias/boundsViolationInTypeAliasExpansion.kt index badd11e9c6c..40739a7922b 100644 --- a/compiler/testData/diagnostics/tests/typealias/boundsViolationInTypeAliasExpansion.kt +++ b/compiler/testData/diagnostics/tests/typealias/boundsViolationInTypeAliasExpansion.kt @@ -28,4 +28,4 @@ fun test12(x: TCList>) {} val test13 = TC>() val test14 = TC>() val test15 = TC>() -val test16 = TCList>() +val test16 = TCList>() diff --git a/compiler/testData/diagnostics/tests/valueClasses/valueClassCannotImplementInterfaceByDelegation.fir.kt b/compiler/testData/diagnostics/tests/valueClasses/valueClassCannotImplementInterfaceByDelegation.fir.kt index 3102b095438..796caee355f 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/valueClassCannotImplementInterfaceByDelegation.fir.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/valueClassCannotImplementInterfaceByDelegation.fir.kt @@ -13,4 +13,4 @@ object FooImpl : IFoo value class Test1(val x: Any) : IFoo by FooImpl @JvmInline -value class Test2(val x: IFoo) : IFoo by x +value class Test2(val x: IFoo) : IFoo by x diff --git a/compiler/testData/diagnostics/tests/valueClasses/valueClassCannotImplementInterfaceByDelegation.kt b/compiler/testData/diagnostics/tests/valueClasses/valueClassCannotImplementInterfaceByDelegation.kt index 8b16aefb048..b991e47e351 100644 --- a/compiler/testData/diagnostics/tests/valueClasses/valueClassCannotImplementInterfaceByDelegation.kt +++ b/compiler/testData/diagnostics/tests/valueClasses/valueClassCannotImplementInterfaceByDelegation.kt @@ -13,4 +13,4 @@ object FooImpl : IFoo value class Test1(val x: Any) : IFoo by FooImpl @JvmInline -value class Test2(val x: IFoo) : IFoo by x +value class Test2(val x: IFoo) : IFoo by x diff --git a/compiler/testData/diagnostics/tests/varargs/kt10926.kt b/compiler/testData/diagnostics/tests/varargs/kt10926.kt index 4f1a7f741af..979b32e2766 100644 --- a/compiler/testData/diagnostics/tests/varargs/kt10926.kt +++ b/compiler/testData/diagnostics/tests/varargs/kt10926.kt @@ -101,34 +101,34 @@ class AllCollection { fun box(): String { val c: AllCollection = AllCollection() - val x1 = c.addAll1(listOf("")) + val x1 = c.addAll1(listOf("")) val x2 = c.addAll2(listOf("")) val x3 = c.addAll3(listOf("")) - val x4 = c.addAll4(listOf("")) + val x4 = c.addAll4(listOf("")) val x5 = c.addAll5(listOf("")) val x6 = c.addAll6(listOf("")) - val x7 = c.addAll7(listOf("")) + val x7 = c.addAll7(listOf("")) val x8 = c.addAll8(listOf("")) val x9 = c.addAll9(listOf("")) - val x10 = c.addAll10(listOf("")) + val x10 = c.addAll10(listOf("")) val x11 = c.addAll11(listOf("")) - val x12 = c.addAll12(listOf("")) + val x12 = c.addAll12(listOf("")) val x13 = c.addAll13(listOf("")) - val x14 = c.addAll14(listOf("")) - val x15 = c.addAll15(listOf("")) + val x14 = c.addAll14(listOf("")) + val x15 = c.addAll15(listOf("")) val x16 = c.addAll16(listOf(""), listOf("")) - val x17 = c.addAll17(listOf(""), listOf("")) + val x17 = c.addAll17(listOf(""), listOf("")) val x18 = c.addAll18(listOf(""), listOf("")) - val x19 = c.addAll19(listOf(""), listOf("")) - val x20 = c.addAll20(listOf(""), listOf("")) - val x21 = c.addAll21(listOf(""), listOf("")) + val x19 = c.addAll19(listOf(""), listOf("")) + val x20 = c.addAll20(listOf(""), listOf("")) + val x21 = c.addAll21(listOf(""), listOf("")) val x22 = c.addAll22(listOf(""), listOf("")) - val x23 = c.addAll23(listOf(""), listOf("")) - val x24 = c.addAll24(listOf(""), listOf("")) + val x23 = c.addAll23(listOf(""), listOf("")) + val x24 = c.addAll24(listOf(""), listOf("")) val x25 = c.addAll25(listOf(""), listOf("")) - val x26 = c.addAll26(listOf(""), listOf("")) + val x26 = c.addAll26(listOf(""), listOf("")) - val all = arrayOf(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26) + val all = arrayOf(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26) return if (all.all { it == "OK" }) "OK" else "NOK" } diff --git a/compiler/testData/diagnostics/tests/varargs/kt48162.kt b/compiler/testData/diagnostics/tests/varargs/kt48162.kt index 88b956c4fda..0406f61979b 100644 --- a/compiler/testData/diagnostics/tests/varargs/kt48162.kt +++ b/compiler/testData/diagnostics/tests/varargs/kt48162.kt @@ -12,9 +12,9 @@ class Foo { fun use(arg: Array, s: Collection, x: Foo) { arr(*arg) - arr(*s.toArray()) + arr(*s.toArray()) arr(*s.toArray2()) - arr(*toArray3(s)) + arr(*toArray3(s)) arr(*x + x) arr(*(x + x)) } diff --git a/compiler/testData/diagnostics/tests/when/ExhaustiveValOverConditionalInit.fir.kt b/compiler/testData/diagnostics/tests/when/ExhaustiveValOverConditionalInit.fir.kt index cf3175bb2a2..2d4d90ea0b8 100644 --- a/compiler/testData/diagnostics/tests/when/ExhaustiveValOverConditionalInit.fir.kt +++ b/compiler/testData/diagnostics/tests/when/ExhaustiveValOverConditionalInit.fir.kt @@ -28,7 +28,7 @@ fun bar(a: Boolean, b: Boolean): Int { if (a) { x = 1 } - when (b) { + when (b) { false -> x = 3 } return x diff --git a/compiler/testData/diagnostics/tests/when/ExhaustiveValOverConditionalInit.kt b/compiler/testData/diagnostics/tests/when/ExhaustiveValOverConditionalInit.kt index aa6ea32d0fb..fe5783bc145 100644 --- a/compiler/testData/diagnostics/tests/when/ExhaustiveValOverConditionalInit.kt +++ b/compiler/testData/diagnostics/tests/when/ExhaustiveValOverConditionalInit.kt @@ -28,7 +28,7 @@ fun bar(a: Boolean, b: Boolean): Int { if (a) { x = 1 } - when (b) { + when (b) { false -> x = 3 } return x diff --git a/compiler/testData/diagnostics/tests/when/ExhaustiveVarOverConditionalInit.fir.kt b/compiler/testData/diagnostics/tests/when/ExhaustiveVarOverConditionalInit.fir.kt index 84c24b1a14c..4c657eb3d9f 100644 --- a/compiler/testData/diagnostics/tests/when/ExhaustiveVarOverConditionalInit.fir.kt +++ b/compiler/testData/diagnostics/tests/when/ExhaustiveVarOverConditionalInit.fir.kt @@ -27,7 +27,7 @@ fun bar(a: Boolean, b: Boolean): Int { if (a) { x = 1 } - when (b) { + when (b) { false -> x = 3 } return x diff --git a/compiler/testData/diagnostics/tests/when/ExhaustiveVarOverConditionalInit.kt b/compiler/testData/diagnostics/tests/when/ExhaustiveVarOverConditionalInit.kt index 9ec0651a878..246957e85a1 100644 --- a/compiler/testData/diagnostics/tests/when/ExhaustiveVarOverConditionalInit.kt +++ b/compiler/testData/diagnostics/tests/when/ExhaustiveVarOverConditionalInit.kt @@ -27,7 +27,7 @@ fun bar(a: Boolean, b: Boolean): Int { if (a) { x = 1 } - when (b) { + when (b) { false -> x = 3 } return x diff --git a/compiler/testData/diagnostics/tests/when/NonExhaustiveWarning.kt b/compiler/testData/diagnostics/tests/when/NonExhaustiveWarning.kt index 186b261853c..82d2d964209 100644 --- a/compiler/testData/diagnostics/tests/when/NonExhaustiveWarning.kt +++ b/compiler/testData/diagnostics/tests/when/NonExhaustiveWarning.kt @@ -17,7 +17,7 @@ enum class X { A, B, C, D } fun foo(arg: X): String { var res = "XXX" - when (arg) { + when (arg) { X.A -> res = "A" X.B -> res = "B" } diff --git a/compiler/testData/diagnostics/tests/when/NonExhaustiveWarningForSealedClass.fir.kt b/compiler/testData/diagnostics/tests/when/NonExhaustiveWarningForSealedClass.fir.kt index 405dfb5e8cf..e38e83f60b4 100644 --- a/compiler/testData/diagnostics/tests/when/NonExhaustiveWarningForSealedClass.fir.kt +++ b/compiler/testData/diagnostics/tests/when/NonExhaustiveWarningForSealedClass.fir.kt @@ -23,7 +23,7 @@ object Last : S() fun use(s: String) = s fun foo(s: S) { - when (s) { + when (s) { First -> {} is Derived -> use(s.s) } diff --git a/compiler/testData/diagnostics/tests/when/NonExhaustiveWarningForSealedClass.kt b/compiler/testData/diagnostics/tests/when/NonExhaustiveWarningForSealedClass.kt index a4891879ee9..35c31f6ddb5 100644 --- a/compiler/testData/diagnostics/tests/when/NonExhaustiveWarningForSealedClass.kt +++ b/compiler/testData/diagnostics/tests/when/NonExhaustiveWarningForSealedClass.kt @@ -23,7 +23,7 @@ object Last : S() fun use(s: String) = s fun foo(s: S) { - when (s) { + when (s) { First -> {} is Derived -> use(s.s) } diff --git a/compiler/testData/diagnostics/tests/when/NonExhaustiveWarningNull.kt b/compiler/testData/diagnostics/tests/when/NonExhaustiveWarningNull.kt index c9557bcc556..6f4593be511 100644 --- a/compiler/testData/diagnostics/tests/when/NonExhaustiveWarningNull.kt +++ b/compiler/testData/diagnostics/tests/when/NonExhaustiveWarningNull.kt @@ -18,7 +18,7 @@ enum class X { A, B, C, D } fun foo(arg: X?): String { var res = "XXX" - when (arg) { + when (arg) { X.A -> res = "A" X.B -> res = "B" X.C -> res = "C" diff --git a/compiler/testData/diagnostics/tests/when/deprecatedSyntaxInConditionsNoSubject.fir.kt b/compiler/testData/diagnostics/tests/when/deprecatedSyntaxInConditionsNoSubject.fir.kt index 7876bffa25b..3218bfac558 100644 --- a/compiler/testData/diagnostics/tests/when/deprecatedSyntaxInConditionsNoSubject.fir.kt +++ b/compiler/testData/diagnostics/tests/when/deprecatedSyntaxInConditionsNoSubject.fir.kt @@ -54,7 +54,7 @@ fun testWithSubject_ok(x: Boolean, y: Boolean?, any: Any, z: Boolean) { } var b = z - when (z) { + when (z) { b++ -> {} b-- -> {} } diff --git a/compiler/testData/diagnostics/tests/when/deprecatedSyntaxInConditionsNoSubject.kt b/compiler/testData/diagnostics/tests/when/deprecatedSyntaxInConditionsNoSubject.kt index c7cfe0a57c9..10722280a8a 100644 --- a/compiler/testData/diagnostics/tests/when/deprecatedSyntaxInConditionsNoSubject.kt +++ b/compiler/testData/diagnostics/tests/when/deprecatedSyntaxInConditionsNoSubject.kt @@ -54,7 +54,7 @@ fun testWithSubject_ok(x: Boolean, y: Boolean?, any: Any, z: Boolean) { } var b = z - when (z) { + when (z) { b++ -> {} b-- -> {} } diff --git a/compiler/testData/diagnostics/tests/when/deprecatedSyntaxInConditions_after.fir.kt b/compiler/testData/diagnostics/tests/when/deprecatedSyntaxInConditions_after.fir.kt index 2110cc21c08..4fc2e19920a 100644 --- a/compiler/testData/diagnostics/tests/when/deprecatedSyntaxInConditions_after.fir.kt +++ b/compiler/testData/diagnostics/tests/when/deprecatedSyntaxInConditions_after.fir.kt @@ -87,12 +87,12 @@ fun testWithSubject_bad_1(x: A) { fun testWithSubject_bad_2(b: Boolean) { // bad - when (b) { + when (b) { b && b -> {} b || b -> {} } // ok - when (b) { + when (b) { (b && b) -> {} (b || b) -> {} } @@ -191,12 +191,12 @@ fun testWithRange_bad_1(x: A) { fun testWithRange_bad_2(b: Boolean) { // bad - when (b) { + when (b) { in b && b -> {} in b || b -> {} } // ok - when (b) { + when (b) { in (b && b) -> {} in (b || b) -> {} } diff --git a/compiler/testData/diagnostics/tests/when/deprecatedSyntaxInConditions_after.kt b/compiler/testData/diagnostics/tests/when/deprecatedSyntaxInConditions_after.kt index ec9eebe43bd..131ce725c3f 100644 --- a/compiler/testData/diagnostics/tests/when/deprecatedSyntaxInConditions_after.kt +++ b/compiler/testData/diagnostics/tests/when/deprecatedSyntaxInConditions_after.kt @@ -87,12 +87,12 @@ fun testWithSubject_bad_1(x: A) { fun testWithSubject_bad_2(b: Boolean) { // bad - when (b) { + when (b) { b && b -> {} b || b -> {} } // ok - when (b) { + when (b) { (b && b) -> {} (b || b) -> {} } @@ -191,12 +191,12 @@ fun testWithRange_bad_1(x: A) { fun testWithRange_bad_2(b: Boolean) { // bad - when (b) { + when (b) { in b && b -> {} in b || b -> {} } // ok - when (b) { + when (b) { in (b && b) -> {} in (b || b) -> {} } diff --git a/compiler/testData/diagnostics/tests/when/deprecatedSyntaxInConditions_before.fir.kt b/compiler/testData/diagnostics/tests/when/deprecatedSyntaxInConditions_before.fir.kt index 88158720f55..55e539f034b 100644 --- a/compiler/testData/diagnostics/tests/when/deprecatedSyntaxInConditions_before.fir.kt +++ b/compiler/testData/diagnostics/tests/when/deprecatedSyntaxInConditions_before.fir.kt @@ -87,12 +87,12 @@ fun testWithSubject_bad_1(x: A) { fun testWithSubject_bad_2(b: Boolean) { // bad - when (b) { + when (b) { b && b -> {} b || b -> {} } // ok - when (b) { + when (b) { (b && b) -> {} (b || b) -> {} } @@ -191,12 +191,12 @@ fun testWithRange_bad_1(x: A) { fun testWithRange_bad_2(b: Boolean) { // bad - when (b) { + when (b) { in b && b -> {} in b || b -> {} } // ok - when (b) { + when (b) { in (b && b) -> {} in (b || b) -> {} } diff --git a/compiler/testData/diagnostics/tests/when/deprecatedSyntaxInConditions_before.kt b/compiler/testData/diagnostics/tests/when/deprecatedSyntaxInConditions_before.kt index e9efdb6afe3..3b2f7079f94 100644 --- a/compiler/testData/diagnostics/tests/when/deprecatedSyntaxInConditions_before.kt +++ b/compiler/testData/diagnostics/tests/when/deprecatedSyntaxInConditions_before.kt @@ -87,12 +87,12 @@ fun testWithSubject_bad_1(x: A) { fun testWithSubject_bad_2(b: Boolean) { // bad - when (b) { + when (b) { b && b -> {} b || b -> {} } // ok - when (b) { + when (b) { (b && b) -> {} (b || b) -> {} } @@ -191,12 +191,12 @@ fun testWithRange_bad_1(x: A) { fun testWithRange_bad_2(b: Boolean) { // bad - when (b) { + when (b) { in b && b -> {} in b || b -> {} } // ok - when (b) { + when (b) { in (b && b) -> {} in (b || b) -> {} } diff --git a/compiler/testData/diagnostics/tests/when/kt47922.fir.kt b/compiler/testData/diagnostics/tests/when/kt47922.fir.kt index 1d39f987a62..40feeeaf694 100644 --- a/compiler/testData/diagnostics/tests/when/kt47922.fir.kt +++ b/compiler/testData/diagnostics/tests/when/kt47922.fir.kt @@ -13,7 +13,7 @@ abstract class NonSealedBase { sealed class ToState val sealedTest: SealedBase.() -> ToState? = { - when(this) {} + when(this) {} } val nonSealedTest: NonSealedBase.() -> ToState? = { diff --git a/compiler/testData/diagnostics/tests/when/kt47922.kt b/compiler/testData/diagnostics/tests/when/kt47922.kt index a919bf47920..63877d762b6 100644 --- a/compiler/testData/diagnostics/tests/when/kt47922.kt +++ b/compiler/testData/diagnostics/tests/when/kt47922.kt @@ -13,7 +13,7 @@ abstract class NonSealedBase { sealed class ToState val sealedTest: SealedBase.() -> ToState? = { - when(this) {} + when(this) {} } val nonSealedTest: NonSealedBase.() -> ToState? = { diff --git a/compiler/testData/diagnostics/tests/when/kt49702.kt b/compiler/testData/diagnostics/tests/when/kt49702.kt index 65716474c01..c30d9ee360a 100644 --- a/compiler/testData/diagnostics/tests/when/kt49702.kt +++ b/compiler/testData/diagnostics/tests/when/kt49702.kt @@ -3,7 +3,7 @@ sealed class A { class B:A() class :A() fun test(a : A) { - ' branches or 'else' branch instead")!>when(a) { + when(a) { } } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/assert/cast.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/assert/cast.fir.kt index de27f93ac6b..ae45e4c813f 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/assert/cast.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/assert/cast.fir.kt @@ -16,5 +16,5 @@ fun test1(a: A) { fun test2() { val a: A? = null; assert((a as B).bool()) - a?.bool() + a?.bool() } diff --git a/compiler/testData/diagnostics/testsWithStdLib/assert/cast.kt b/compiler/testData/diagnostics/testsWithStdLib/assert/cast.kt index 03cbcfbde8e..5d3d0dfb67c 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/assert/cast.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/assert/cast.kt @@ -16,5 +16,5 @@ fun test1(a: A) { fun test2() { val a: A? = null; assert((a as B).bool()) - a?.bool() + a?.bool() } diff --git a/compiler/testData/diagnostics/testsWithStdLib/assert/safeCall.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/assert/safeCall.fir.kt index f4ff8c4a9ea..c2e06327c08 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/assert/safeCall.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/assert/safeCall.fir.kt @@ -4,7 +4,7 @@ fun test1(s: String?) { assert(s!!.isEmpty()) - s?.length + s?.length } fun test2(s: String?) { @@ -20,7 +20,7 @@ fun test3(s: String?) { fun test4() { val s: String? = null; assert(s!!.isEmpty()) - s?.length + s?.length } fun test5() { diff --git a/compiler/testData/diagnostics/testsWithStdLib/assert/safeCall.kt b/compiler/testData/diagnostics/testsWithStdLib/assert/safeCall.kt index bcaa54212f1..a3980f4cd0c 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/assert/safeCall.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/assert/safeCall.kt @@ -4,7 +4,7 @@ fun test1(s: String?) { assert(s!!.isEmpty()) - s?.length + s?.length } fun test2(s: String?) { @@ -20,7 +20,7 @@ fun test3(s: String?) { fun test4() { val s: String? = null; assert(s!!.isEmpty()) - s?.length + s?.length } fun test5() { diff --git a/compiler/testData/diagnostics/testsWithStdLib/builderInference/inferCoroutineTypeInOldVersion.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/builderInference/inferCoroutineTypeInOldVersion.fir.kt deleted file mode 100644 index f6482deec02..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/builderInference/inferCoroutineTypeInOldVersion.fir.kt +++ /dev/null @@ -1,29 +0,0 @@ -// !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -UNUSED_PARAMETER - -class Builder { - suspend fun add(t: T) {} -} - -fun build(g: suspend Builder.() -> Unit): List = TODO() -fun wrongBuild(g: Builder.() -> Unit): List = TODO() - -fun Builder.extensionAdd(s: S) {} - -suspend fun Builder.safeExtensionAdd(s: S) {} - -val member = build { - add(42) -} - -val memberWithoutAnn = wrongBuild { - add(42) -} - -val extension = build { - extensionAdd("foo") -} - -val safeExtension = build { - safeExtensionAdd("foo") -} diff --git a/compiler/testData/diagnostics/testsWithStdLib/builderInference/inferCoroutineTypeInOldVersion.kt b/compiler/testData/diagnostics/testsWithStdLib/builderInference/inferCoroutineTypeInOldVersion.kt index 871f58e247e..da0fc0757cb 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/builderInference/inferCoroutineTypeInOldVersion.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/builderInference/inferCoroutineTypeInOldVersion.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !LANGUAGE: +UnrestrictedBuilderInference // !DIAGNOSTICS: -UNUSED_PARAMETER @@ -12,18 +13,18 @@ fun Builder.extensionAdd(s: S) {} suspend fun Builder.safeExtensionAdd(s: S) {} -val member = build { +val member = build { add(42) } -val memberWithoutAnn = wrongBuild { +val memberWithoutAnn = wrongBuild { add(42) } -val extension = build { +val extension = build { extensionAdd("foo") } -val safeExtension = build { +val safeExtension = build { safeExtensionAdd("foo") } diff --git a/compiler/testData/diagnostics/testsWithStdLib/builderInference/inferCoroutineTypeInOldVersion.txt b/compiler/testData/diagnostics/testsWithStdLib/builderInference/inferCoroutineTypeInOldVersion.txt index 021aa4b6685..636326e9056 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/builderInference/inferCoroutineTypeInOldVersion.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/builderInference/inferCoroutineTypeInOldVersion.txt @@ -1,17 +1,9 @@ package -public val extension: [ERROR : Type for build { - extensionAdd("foo") -}] -public val member: [ERROR : Type for build { - add(42) -}] -public val memberWithoutAnn: [ERROR : Type for wrongBuild { - add(42) -}] -public val safeExtension: [ERROR : Type for build { - safeExtensionAdd("foo") -}] +public val extension: kotlin.collections.List +public val member: kotlin.collections.List +public val memberWithoutAnn: kotlin.collections.List +public val safeExtension: kotlin.collections.List public fun build(/*0*/ g: suspend Builder.() -> kotlin.Unit): kotlin.collections.List public fun wrongBuild(/*0*/ g: Builder.() -> kotlin.Unit): kotlin.collections.List public fun Builder.extensionAdd(/*0*/ s: S): kotlin.Unit diff --git a/compiler/testData/diagnostics/testsWithStdLib/builderInference/resolveUsualCallWithBuilderInference.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/builderInference/resolveUsualCallWithBuilderInference.fir.kt deleted file mode 100644 index 3fd2361ddb7..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/builderInference/resolveUsualCallWithBuilderInference.fir.kt +++ /dev/null @@ -1,38 +0,0 @@ -// ALLOW_KOTLIN_PACKAGE -// !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -UNUSED_PARAMETER -// FILE: annotation.kt - -package kotlin - -annotation class BuilderInference - -// FILE: test.kt - -class Builder { - fun add(t: T) {} -} - -fun build(@BuilderInference g: Builder.() -> Unit): List = TODO() -fun wrongBuild(g: Builder.() -> Unit): List = TODO() - -fun Builder.extensionAdd(s: S) {} - -@BuilderInference -fun Builder.safeExtensionAdd(s: S) {} - -val member = build { - add(42) -} - -val memberWithoutAnn = wrongBuild { - add(42) -} - -val extension = build { - extensionAdd("foo") -} - -val safeExtension = build { - safeExtensionAdd("foo") -} diff --git a/compiler/testData/diagnostics/testsWithStdLib/builderInference/resolveUsualCallWithBuilderInference.kt b/compiler/testData/diagnostics/testsWithStdLib/builderInference/resolveUsualCallWithBuilderInference.kt index 10b32ee4a01..677ce2030fc 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/builderInference/resolveUsualCallWithBuilderInference.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/builderInference/resolveUsualCallWithBuilderInference.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // ALLOW_KOTLIN_PACKAGE // !LANGUAGE: +UnrestrictedBuilderInference // !DIAGNOSTICS: -UNUSED_PARAMETER @@ -25,7 +26,7 @@ val member = build { add(42) } -val memberWithoutAnn = wrongBuild { +val memberWithoutAnn = wrongBuild { add(42) } diff --git a/compiler/testData/diagnostics/testsWithStdLib/builderInference/resolveUsualCallWithBuilderInference.txt b/compiler/testData/diagnostics/testsWithStdLib/builderInference/resolveUsualCallWithBuilderInference.txt index 4ba791ecafa..5fb9bdce912 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/builderInference/resolveUsualCallWithBuilderInference.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/builderInference/resolveUsualCallWithBuilderInference.txt @@ -2,9 +2,7 @@ package public val extension: kotlin.collections.List public val member: kotlin.collections.List -public val memberWithoutAnn: [ERROR : Type for wrongBuild { - add(42) -}] +public val memberWithoutAnn: kotlin.collections.List public val safeExtension: kotlin.collections.List public fun build(/*0*/ @kotlin.BuilderInference g: Builder.() -> kotlin.Unit): kotlin.collections.List public fun wrongBuild(/*0*/ g: Builder.() -> kotlin.Unit): kotlin.collections.List diff --git a/compiler/testData/diagnostics/testsWithStdLib/builderInference/resolveUsualCallWithBuilderInferenceWithRestrictions.kt b/compiler/testData/diagnostics/testsWithStdLib/builderInference/resolveUsualCallWithBuilderInferenceWithRestrictions.kt index f56fe7ef2d5..ed3741c1338 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/builderInference/resolveUsualCallWithBuilderInferenceWithRestrictions.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/builderInference/resolveUsualCallWithBuilderInferenceWithRestrictions.kt @@ -25,7 +25,7 @@ val member = build { add(42) } -val memberWithoutAnn = wrongBuild { +val memberWithoutAnn = wrongBuild { add(42) } diff --git a/compiler/testData/diagnostics/testsWithStdLib/builderInference/resolveUsualCallWithBuilderInferenceWithRestrictions.txt b/compiler/testData/diagnostics/testsWithStdLib/builderInference/resolveUsualCallWithBuilderInferenceWithRestrictions.txt index 4ba791ecafa..5fb9bdce912 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/builderInference/resolveUsualCallWithBuilderInferenceWithRestrictions.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/builderInference/resolveUsualCallWithBuilderInferenceWithRestrictions.txt @@ -2,9 +2,7 @@ package public val extension: kotlin.collections.List public val member: kotlin.collections.List -public val memberWithoutAnn: [ERROR : Type for wrongBuild { - add(42) -}] +public val memberWithoutAnn: kotlin.collections.List public val safeExtension: kotlin.collections.List public fun build(/*0*/ @kotlin.BuilderInference g: Builder.() -> kotlin.Unit): kotlin.collections.List public fun wrongBuild(/*0*/ g: Builder.() -> kotlin.Unit): kotlin.collections.List diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/applyInsideCoroutine.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/applyInsideCoroutine.fir.kt deleted file mode 100644 index 464b854d07e..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/applyInsideCoroutine.fir.kt +++ /dev/null @@ -1,35 +0,0 @@ -// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_ANONYMOUS_PARAMETER -UNUSED_VARIABLE -// NI_EXPECTED_FILE - -class Controller { - suspend fun yield(t: T) {} -} - -fun generate(g: suspend Controller.() -> Unit): S = TODO() - -val test1 = generate { - apply { - yield(4) - } -} - -val test2 = generate { - yield(B) - apply { - yield(C) - } -} - -val test3 = generate { - this.let { - yield(B) - } - - apply { - yield(C) - } -} - -interface A -object B : A -object C : A diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/applyInsideCoroutine.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/applyInsideCoroutine.kt index eaf94f2d699..6e35f201672 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/applyInsideCoroutine.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/applyInsideCoroutine.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_ANONYMOUS_PARAMETER -UNUSED_VARIABLE // NI_EXPECTED_FILE @@ -7,26 +8,26 @@ class Controller { fun generate(g: suspend Controller.() -> Unit): S = TODO() -val test1 = generate { - apply { - yield(4) +val test1 = generate { + apply { + yield(4) } } -val test2 = generate { +val test2 = generate { yield(B) - apply { - yield(C) + apply { + yield(C) } } -val test3 = generate { - this.let { +val test3 = generate { + this.let { yield(B) } - apply { - yield(C) + apply { + yield(C) } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/applyInsideCoroutine.ni.txt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/applyInsideCoroutine.ni.txt index 09d104dd806..f1e995ea666 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/applyInsideCoroutine.ni.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/applyInsideCoroutine.ni.txt @@ -1,25 +1,8 @@ package -public val test1: [ERROR : Type for generate { - apply { - yield(4) - } -}] -public val test2: [ERROR : Type for generate { - yield(B) - apply { - yield(C) - } -}] -public val test3: [ERROR : Type for generate { - this.let { - yield(B) - } - - apply { - yield(C) - } -}] +public val test1: kotlin.Int +public val test2: A +public val test3: A public fun generate(/*0*/ g: suspend Controller.() -> kotlin.Unit): S public interface A { diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/recursiveGenerators2.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/recursiveGenerators2.fir.kt deleted file mode 100644 index 874106fa952..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/recursiveGenerators2.fir.kt +++ /dev/null @@ -1,23 +0,0 @@ -// !OPT_IN: kotlin.RequiresOptIn -// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -// NI_EXPECTED_FILE - -@file:OptIn(ExperimentalTypeInference::class) - -import kotlin.experimental.ExperimentalTypeInference - -class GenericController { - suspend fun yield(t: T) {} -} - -fun generate(@BuilderInference g: suspend GenericController.() -> Unit): List = TODO() - -@BuilderInference -suspend fun GenericController>.yieldGenerate(g: suspend GenericController.() -> Unit): Unit = TODO() - -val test1 = generate { - // TODO: KT-15185 - yieldGenerate { - yield(4) - } -} diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/recursiveGenerators2.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/recursiveGenerators2.kt index a2b60c8daf3..b6fce857fab 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/recursiveGenerators2.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/recursiveGenerators2.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !OPT_IN: kotlin.RequiresOptIn // !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE // NI_EXPECTED_FILE @@ -15,9 +16,9 @@ fun generate(@BuilderInference g: suspend GenericController.() -> Unit): @BuilderInference suspend fun GenericController>.yieldGenerate(g: suspend GenericController.() -> Unit): Unit = TODO() -val test1 = generate { +val test1 = generate { // TODO: KT-15185 - yieldGenerate { + yieldGenerate { yield(4) } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/recursiveGenerators2.ni.txt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/recursiveGenerators2.ni.txt index 78927684873..c4c702482ba 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/recursiveGenerators2.ni.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/recursiveGenerators2.ni.txt @@ -1,11 +1,6 @@ package -public val test1: [ERROR : Type for generate { - // TODO: KT-15185 - yieldGenerate { - yield(4) - } -}] +public val test1: kotlin.collections.List> public fun generate(/*0*/ @kotlin.BuilderInference g: suspend GenericController.() -> kotlin.Unit): kotlin.collections.List @kotlin.BuilderInference public suspend fun GenericController>.yieldGenerate(/*0*/ g: suspend GenericController.() -> kotlin.Unit): kotlin.Unit diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/suspendCallsWrongUpperBound.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/suspendCallsWrongUpperBound.kt index 916b60bc8b0..2e3012bcb30 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/suspendCallsWrongUpperBound.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/suspendCallsWrongUpperBound.kt @@ -7,6 +7,6 @@ class Controller { fun generate(g: suspend Controller.() -> Unit): S = TODO() -val test = generate { - yield("foo") +val test = generate { + yield("foo") } diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/suspendCallsWrongUpperBound.ni.txt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/suspendCallsWrongUpperBound.ni.txt index 4e862b7743f..08125502bb3 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/suspendCallsWrongUpperBound.ni.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/suspendCallsWrongUpperBound.ni.txt @@ -1,8 +1,6 @@ package -public val test: [ERROR : Type for generate { - yield("foo") -}] +public val test: kotlin.String public fun generate(/*0*/ g: suspend Controller.() -> kotlin.Unit): S public final class Controller { diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/withUninferredParameter.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/withUninferredParameter.fir.kt deleted file mode 100644 index 72d9fb268a1..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/withUninferredParameter.fir.kt +++ /dev/null @@ -1,20 +0,0 @@ -// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_ANONYMOUS_PARAMETER -UNUSED_VARIABLE -// NI_EXPECTED_FILE - -class GenericController { - suspend fun yield(t: T) {} -} - -fun generate(g: suspend GenericController.(S) -> Unit): S = TODO() - -val test1 = generate { - yield(4) -} - -val test2 = generate { - yield(4) -} - -val test3 = generate { bar: Int -> - yield(4) -} diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/withUninferredParameter.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/withUninferredParameter.kt index 4e2499f3c0f..a7786dd3c07 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/withUninferredParameter.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/withUninferredParameter.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_ANONYMOUS_PARAMETER -UNUSED_VARIABLE // NI_EXPECTED_FILE @@ -7,7 +8,7 @@ class GenericController { fun generate(g: suspend GenericController.(S) -> Unit): S = TODO() -val test1 = generate { +val test1 = generate { yield(4) } diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/withUninferredParameter.ni.txt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/withUninferredParameter.ni.txt index 5bc218f1a4a..e728cad5e82 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/withUninferredParameter.ni.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/withUninferredParameter.ni.txt @@ -1,8 +1,6 @@ package -public val test1: [ERROR : Type for generate { - yield(4) -}] +public val test1: kotlin.Int public val test2: kotlin.Int public val test3: kotlin.Int public fun generate(/*0*/ g: suspend GenericController.(S) -> kotlin.Unit): S diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalIsNotEnabled.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalIsNotEnabled.kt index bd3339ee87b..fe95be19ea8 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalIsNotEnabled.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalIsNotEnabled.kt @@ -1,7 +1,7 @@ // FIR_IDENTICAL // FILE: api.kt -@RequiresOptIn +@RequiresOptIn @Retention(AnnotationRetention.BINARY) annotation class Marker @@ -19,7 +19,7 @@ fun use2() { f() } -@OptIn(Marker::class) +@OptIn(Marker::class) fun use3() { f() } diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/notNullAnnotation.txt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/notNullAnnotation.txt index dc8ec2ca491..64bd61bc4f7 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/notNullAnnotation.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/notNullAnnotation.txt @@ -38,3 +38,4 @@ public interface TypePredicate : (KotlinType) -> kotlin.Boolean { public abstract override /*1*/ fun invoke(/*0*/ typeToCheck: KotlinType): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } + diff --git a/compiler/testData/diagnostics/testsWithStdLib/regression/kt34391.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/regression/kt34391.fir.kt deleted file mode 100644 index 5b65c427fd2..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/regression/kt34391.fir.kt +++ /dev/null @@ -1,19 +0,0 @@ -// !LANGUAGE: +NewInference - -fun main() { - val list = listOf(A()) - list.forEach(A::foo) - list.forEach { - it.foo() - } -} - -class A { - @ExperimentalTime - fun foo() { - println("a") - } -} - -@RequiresOptIn(level = RequiresOptIn.Level.ERROR) -annotation class ExperimentalTime diff --git a/compiler/testData/diagnostics/testsWithStdLib/regression/kt34391.kt b/compiler/testData/diagnostics/testsWithStdLib/regression/kt34391.kt index 92aff91eed5..dbdc019bba5 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/regression/kt34391.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/regression/kt34391.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !LANGUAGE: +NewInference fun main() { @@ -15,5 +16,5 @@ class A { } } -@RequiresOptIn(level = RequiresOptIn.Level.ERROR) +@RequiresOptIn(level = RequiresOptIn.Level.ERROR) annotation class ExperimentalTime diff --git a/compiler/testData/diagnostics/testsWithStdLib/resolve/javaStaticMembers.kt b/compiler/testData/diagnostics/testsWithStdLib/resolve/javaStaticMembers.kt index f1532277731..cd512b70b79 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/resolve/javaStaticMembers.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/resolve/javaStaticMembers.kt @@ -8,5 +8,5 @@ fun ff() { val a = Test.FOO val b = Test?.FOO System.out.println(a + b) - System?.out.println(a + b) + System?.out.println(a + b) } diff --git a/compiler/testData/diagnostics/testsWithStdLib/when/kt10192.kt b/compiler/testData/diagnostics/testsWithStdLib/when/kt10192.kt index ce3424bd489..b067a46bc83 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/when/kt10192.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/when/kt10192.kt @@ -2,7 +2,7 @@ // LANGUAGE: +WarnAboutNonExhaustiveWhenOnAlgebraicTypes fun test1() { if (true) { - when (true) { + when (true) { true -> println() } } else { @@ -13,7 +13,7 @@ fun test1() { fun test2() { val mlist = arrayListOf("") if (true) { - when (true) { + when (true) { true -> println() } } else { diff --git a/compiler/testData/ir/irText/expressions/bangbang.fir.ir.txt b/compiler/testData/ir/irText/expressions/bangbang.fir.ir.txt index 68aa0fd3f09..357a4e7becd 100644 --- a/compiler/testData/ir/irText/expressions/bangbang.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/bangbang.fir.ir.txt @@ -25,11 +25,11 @@ FILE fqName: fileName:/bangbang.kt if: CONST Boolean type=kotlin.Boolean value=true then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null $this: GET_VAR 'val tmp_0: kotlin.Any? [val] declared in .test2' type=kotlin.Any? origin=null - FUN name:test3 visibility:public modality:FINAL (a:X of .test3) returnType:X of .test3 + FUN name:test3 visibility:public modality:FINAL (a:X of .test3) returnType:{X of .test3 & Any} TYPE_PARAMETER name:X index:0 variance: superTypes:[kotlin.Any?] VALUE_PARAMETER name:a index:0 type:X of .test3 BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test3 (a: X of .test3): X of .test3 declared in ' + RETURN type=kotlin.Nothing from='public final fun test3 (a: X of .test3): {X of .test3 & Any} declared in ' CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type={X of .test3 & Any} origin=EXCLEXCL : X of .test3 arg0: GET_VAR 'a: X of .test3 declared in .test3' type=X of .test3 origin=null diff --git a/compiler/testData/ir/irText/expressions/bangbang.fir.kt.txt b/compiler/testData/ir/irText/expressions/bangbang.fir.kt.txt index dd8140cc05f..8135699d2d0 100644 --- a/compiler/testData/ir/irText/expressions/bangbang.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/bangbang.fir.kt.txt @@ -12,7 +12,7 @@ fun test2(a: Any?): Int { }) } -fun test3(a: X): X { +fun test3(a: X): (X & Any) { return CHECK_NOT_NULL(arg0 = a) } @@ -27,3 +27,4 @@ fun test4(a: X) { a is String? -> useString(s = CHECK_NOT_NULL(arg0 = a /*as String? */)) } } + diff --git a/compiler/testData/ir/irText/expressions/bangbang.ir.txt b/compiler/testData/ir/irText/expressions/bangbang.ir.txt index c834cad54f4..0186e9fe986 100644 --- a/compiler/testData/ir/irText/expressions/bangbang.ir.txt +++ b/compiler/testData/ir/irText/expressions/bangbang.ir.txt @@ -25,11 +25,11 @@ FILE fqName: fileName:/bangbang.kt if: CONST Boolean type=kotlin.Boolean value=true then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null $this: GET_VAR 'val tmp_0: kotlin.Any? [val] declared in .test2' type=kotlin.Any? origin=null - FUN name:test3 visibility:public modality:FINAL (a:X of .test3) returnType:X of .test3 + FUN name:test3 visibility:public modality:FINAL (a:X of .test3) returnType:{X of .test3 & Any} TYPE_PARAMETER name:X index:0 variance: superTypes:[kotlin.Any?] VALUE_PARAMETER name:a index:0 type:X of .test3 BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test3 (a: X of .test3): X of .test3 declared in ' + RETURN type=kotlin.Nothing from='public final fun test3 (a: X of .test3): {X of .test3 & Any} declared in ' CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=X of .test3 origin=EXCLEXCL : X of .test3 arg0: GET_VAR 'a: X of .test3 declared in .test3' type=X of .test3 origin=null diff --git a/compiler/testData/ir/irText/expressions/bangbang.kt.txt b/compiler/testData/ir/irText/expressions/bangbang.kt.txt index d87d03ef071..afba0e9c630 100644 --- a/compiler/testData/ir/irText/expressions/bangbang.kt.txt +++ b/compiler/testData/ir/irText/expressions/bangbang.kt.txt @@ -12,7 +12,7 @@ fun test2(a: Any?): Int { }) } -fun test3(a: X): X { +fun test3(a: X): (X & Any) { return CHECK_NOT_NULL(arg0 = a) } @@ -27,3 +27,4 @@ fun test4(a: X) { a is String? -> useString(s = CHECK_NOT_NULL(arg0 = a) /*as String */) } } + diff --git a/compiler/testData/ir/irText/expressions/implicitCastToNonNull.fir.ir.txt b/compiler/testData/ir/irText/expressions/implicitCastToNonNull.fir.ir.txt deleted file mode 100644 index 1fd1e707349..00000000000 --- a/compiler/testData/ir/irText/expressions/implicitCastToNonNull.fir.ir.txt +++ /dev/null @@ -1,75 +0,0 @@ -FILE fqName: fileName:/implicitCastToNonNull.kt - FUN name:test1 visibility:public modality:FINAL <> (x:kotlin.String?) returnType:kotlin.Int - VALUE_PARAMETER name:x index:0 type:kotlin.String? - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test1 (x: kotlin.String?): kotlin.Int declared in ' - WHEN type=kotlin.Int origin=IF - BRANCH - if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'x: kotlin.String? declared in .test1' type=kotlin.String? origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: CONST Int type=kotlin.Int value=0 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY - $this: GET_VAR 'x: kotlin.String? declared in .test1' type=kotlin.String? origin=null - FUN name:test2 visibility:public modality:FINAL (x:T of .test2) returnType:kotlin.Int - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.CharSequence?] - VALUE_PARAMETER name:x index:0 type:T of .test2 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test2 (x: T of .test2): kotlin.Int declared in ' - WHEN type=kotlin.Int origin=IF - BRANCH - if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'x: T of .test2 declared in .test2' type=T of .test2 origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: CONST Int type=kotlin.Int value=0 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public abstract fun (): kotlin.Int declared in kotlin.CharSequence' type=kotlin.Int origin=GET_PROPERTY - $this: GET_VAR 'x: T of .test2 declared in .test2' type=T of .test2 origin=null - FUN name:test3 visibility:public modality:FINAL (x:kotlin.Any) returnType:kotlin.Int [inline] - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.CharSequence?] - VALUE_PARAMETER name:x index:0 type:kotlin.Any - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test3 (x: kotlin.Any): kotlin.Int [inline] declared in ' - WHEN type=kotlin.Int origin=IF - BRANCH - if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=T of .test3 - GET_VAR 'x: kotlin.Any declared in .test3' type=kotlin.Any origin=null - then: CONST Int type=kotlin.Int value=0 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public abstract fun (): kotlin.Int declared in kotlin.CharSequence' type=kotlin.Int origin=GET_PROPERTY - $this: TYPE_OP type={T of .test3 & Any} origin=IMPLICIT_CAST typeOperand={T of .test3 & Any} - GET_VAR 'x: kotlin.Any declared in .test3' type=kotlin.Any origin=null - FUN name:test4 visibility:public modality:FINAL (x:kotlin.Any?) returnType:kotlin.Int [inline] - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.CharSequence] - VALUE_PARAMETER name:x index:0 type:kotlin.Any? - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test4 (x: kotlin.Any?): kotlin.Int [inline] declared in ' - WHEN type=kotlin.Int origin=IF - BRANCH - if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=T of .test4 - GET_VAR 'x: kotlin.Any? declared in .test4' type=kotlin.Any? origin=null - then: CONST Int type=kotlin.Int value=0 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public abstract fun (): kotlin.Int declared in kotlin.CharSequence' type=kotlin.Int origin=GET_PROPERTY - $this: TYPE_OP type=T of .test4 origin=IMPLICIT_CAST typeOperand=T of .test4 - GET_VAR 'x: kotlin.Any? declared in .test4' type=kotlin.Any? origin=null - FUN name:test5 visibility:public modality:FINAL (x:T of .test5, fn:kotlin.Function1.test5, kotlin.Unit>) returnType:kotlin.Unit - TYPE_PARAMETER name:T index:0 variance: superTypes:[S of .test5?] - TYPE_PARAMETER name:S index:1 variance: superTypes:[kotlin.Any?] - VALUE_PARAMETER name:x index:0 type:T of .test5 - VALUE_PARAMETER name:fn index:1 type:kotlin.Function1.test5, kotlin.Unit> - BLOCK_BODY - WHEN type=kotlin.Unit origin=IF - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_VAR 'x: T of .test5 declared in .test5' type=T of .test5 origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=INVOKE - $this: GET_VAR 'fn: kotlin.Function1.test5, kotlin.Unit> declared in .test5' type=kotlin.Function1.test5, kotlin.Unit> origin=VARIABLE_AS_FUNCTION - p1: GET_VAR 'x: T of .test5 declared in .test5' type=T of .test5 origin=null diff --git a/compiler/testData/ir/irText/expressions/implicitCastToNonNull.fir.kt.txt b/compiler/testData/ir/irText/expressions/implicitCastToNonNull.fir.kt.txt deleted file mode 100644 index 38c279849ad..00000000000 --- a/compiler/testData/ir/irText/expressions/implicitCastToNonNull.fir.kt.txt +++ /dev/null @@ -1,33 +0,0 @@ -fun test1(x: String?): Int { - return when { - EQEQ(arg0 = x, arg1 = null) -> 0 - else -> x.() - } -} - -fun test2(x: T): Int { - return when { - EQEQ(arg0 = x, arg1 = null) -> 0 - else -> x.() - } -} - -inline fun test3(x: Any): Int { - return when { - x !is T -> 0 - else -> x /*as (T & Any) */.() - } -} - -inline fun test4(x: Any?): Int { - return when { - x !is T -> 0 - else -> x /*as T */.() - } -} - -fun test5(x: T, fn: Function1) { - when { - EQEQ(arg0 = x, arg1 = null).not() -> fn.invoke(p1 = x) - } -} diff --git a/compiler/testData/ir/irText/expressions/implicitCastToNonNull.ir.txt b/compiler/testData/ir/irText/expressions/implicitCastToNonNull.ir.txt index 5d32173c40c..1fd1e707349 100644 --- a/compiler/testData/ir/irText/expressions/implicitCastToNonNull.ir.txt +++ b/compiler/testData/ir/irText/expressions/implicitCastToNonNull.ir.txt @@ -41,7 +41,7 @@ FILE fqName: fileName:/implicitCastToNonNull.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CALL 'public abstract fun (): kotlin.Int declared in kotlin.CharSequence' type=kotlin.Int origin=GET_PROPERTY - $this: TYPE_OP type=T of .test3 origin=IMPLICIT_CAST typeOperand=T of .test3 + $this: TYPE_OP type={T of .test3 & Any} origin=IMPLICIT_CAST typeOperand={T of .test3 & Any} GET_VAR 'x: kotlin.Any declared in .test3' type=kotlin.Any origin=null FUN name:test4 visibility:public modality:FINAL (x:kotlin.Any?) returnType:kotlin.Int [inline] TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.CharSequence] diff --git a/compiler/testData/ir/irText/expressions/implicitCastToNonNull.kt b/compiler/testData/ir/irText/expressions/implicitCastToNonNull.kt index fa482951574..1e8ea10a291 100644 --- a/compiler/testData/ir/irText/expressions/implicitCastToNonNull.kt +++ b/compiler/testData/ir/irText/expressions/implicitCastToNonNull.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL fun test1(x: String?) = if (x == null) 0 else x.length diff --git a/compiler/testData/ir/irText/expressions/implicitCastToNonNull.kt.txt b/compiler/testData/ir/irText/expressions/implicitCastToNonNull.kt.txt index 02fa9a8e92c..5ef08532517 100644 --- a/compiler/testData/ir/irText/expressions/implicitCastToNonNull.kt.txt +++ b/compiler/testData/ir/irText/expressions/implicitCastToNonNull.kt.txt @@ -15,7 +15,7 @@ fun test2(x: T): Int { inline fun test3(x: Any): Int { return when { x !is T -> 0 - else -> x /*as T */.() + else -> x /*as (T & Any) */.() } } @@ -31,3 +31,4 @@ fun test5(x: T, fn: Function1) { EQEQ(arg0 = x, arg1 = null).not() -> fn.invoke(p1 = x) } } + diff --git a/compiler/testData/ir/irText/expressions/simpleUnaryOperators.ir.txt b/compiler/testData/ir/irText/expressions/simpleUnaryOperators.ir.txt index 5c6a441119a..c3113a636de 100644 --- a/compiler/testData/ir/irText/expressions/simpleUnaryOperators.ir.txt +++ b/compiler/testData/ir/irText/expressions/simpleUnaryOperators.ir.txt @@ -28,4 +28,5 @@ FILE fqName: fileName:/simpleUnaryOperators.kt FUN name:test6 visibility:public modality:FINAL <> () returnType:kotlin.Boolean BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test6 (): kotlin.Boolean declared in ' - CONST Boolean type=kotlin.Boolean value=false + CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCL + $this: CONST Boolean type=kotlin.Boolean value=true diff --git a/compiler/testData/ir/irText/expressions/simpleUnaryOperators.kt.txt b/compiler/testData/ir/irText/expressions/simpleUnaryOperators.kt.txt index dd9a2cdcd72..cc3c0593ddb 100644 --- a/compiler/testData/ir/irText/expressions/simpleUnaryOperators.kt.txt +++ b/compiler/testData/ir/irText/expressions/simpleUnaryOperators.kt.txt @@ -19,5 +19,6 @@ fun test5(x: Boolean): Boolean { } fun test6(): Boolean { - return false + return true.not() } + diff --git a/compiler/testData/ir/irText/types/intersectionType1.fir.ir.txt b/compiler/testData/ir/irText/types/intersectionType1.fir.ir.txt index c4240b3245e..cd123b96104 100644 --- a/compiler/testData/ir/irText/types/intersectionType1.fir.ir.txt +++ b/compiler/testData/ir/irText/types/intersectionType1.fir.ir.txt @@ -33,7 +33,7 @@ FILE fqName: fileName:/intersectionType1.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun foo (a: kotlin.Array<.In.foo>>, b: kotlin.Array<.In>): kotlin.Boolean declared in ' CALL 'public final fun ofType (y: kotlin.Any?): kotlin.Boolean [inline] declared in ' type=kotlin.Boolean origin=null - : kotlin.Any? + : kotlin.Any $receiver: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array [operator] declared in kotlin.Array' type=.In origin=null $this: CALL 'public final fun select (x: S of .select, y: S of .select): S of .select declared in ' type=kotlin.Array.In> origin=null : kotlin.Array.In> diff --git a/compiler/testData/ir/irText/types/intersectionType1.fir.kt.txt b/compiler/testData/ir/irText/types/intersectionType1.fir.kt.txt index a0bda919653..7aaeee102a3 100644 --- a/compiler/testData/ir/irText/types/intersectionType1.fir.kt.txt +++ b/compiler/testData/ir/irText/types/intersectionType1.fir.kt.txt @@ -12,7 +12,7 @@ fun select(x: S, y: S): S { } fun foo(a: Array>, b: Array>): Boolean { - return select>>(x = a, y = b).get(index = 0).ofType(y = true) + return select>>(x = a, y = b).get(index = 0).ofType(y = true) } inline fun In.ofType(y: Any?): Boolean { @@ -24,3 +24,4 @@ fun test() { val a2: Array> = arrayOf>(elements = [In()]) foo(a = a1, b = a2) /*~> Unit */ } + diff --git a/compiler/testData/resolve/Projections.resolve b/compiler/testData/resolve/Projections.resolve index 42232750344..13abe5f9d29 100644 --- a/compiler/testData/resolve/Projections.resolve +++ b/compiler/testData/resolve/Projections.resolve @@ -18,8 +18,8 @@ class Inv() { fun testInOut() { In().`In.f:T->Unit`f("1"); (return as In).`In.f:T->Unit`f("1"); - (return as In).`!null`f("1") - (return as In<*>).`!null`f("1"); + (return as In).f("1") + (return as In<*>).f("1"); In().`In.f:Int->Int`f(1); (return as In).`In.f:Int->Int`f(1); diff --git a/compiler/tests-spec/testData/codegen/box/linked/expressions/when-expression/p-4/neg/1.2.exceptions.compiletime.txt b/compiler/tests-spec/testData/codegen/box/linked/expressions/when-expression/p-4/neg/1.2.exceptions.compiletime.txt index fb37ec742e5..19a8873ef82 100644 --- a/compiler/tests-spec/testData/codegen/box/linked/expressions/when-expression/p-4/neg/1.2.exceptions.compiletime.txt +++ b/compiler/tests-spec/testData/codegen/box/linked/expressions/when-expression/p-4/neg/1.2.exceptions.compiletime.txt @@ -1 +1 @@ -java.lang.IllegalStateException: NO_ELSE_IN_WHEN: 'when' expression must be exhaustive, add necessary 'false' branch or 'else' branch instead (15,17) in /1.2.kt +java.lang.IllegalStateException: NO_ELSE_IN_WHEN: 'when' expression must be exhaustive, add necessary 'true', 'false' branches or 'else' branch instead (15,17) in /1.2.kt \ No newline at end of file diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos/1.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos/1.1.fir.kt index a6cacdf2b94..e816658a58d 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos/1.1.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos/1.1.fir.kt @@ -60,11 +60,11 @@ fun case_5(value_1: Int, value_2: Int, value_3: Boolean?) { false -> "2" null -> "3" } - value_1 == 5 -> when (value_3) { + value_1 == 5 -> when (value_3) { true -> "1" false -> "2" } - value_1 == 6 -> when (value_3) {} + value_1 == 6 -> when (value_3) {} } } diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos/1.1.kt index fb1914ed7a2..84317f0516a 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos/1.1.kt @@ -71,11 +71,14 @@ fun case_5(value_1: Int, value_2: Int, value_3: Boolean?) { false -> "2" null -> "3" } - value_1 == 5 -> when (value_3) { + value_1 == 5 -> when (value_3) { true -> "1" false -> "2" + else -> "" + } + value_1 == 6 -> when (value_3) { + else -> "" } - value_1 == 6 -> when (value_3) {} } } diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/pos/1.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/pos/1.1.fir.kt index f399bcd7ed2..1d92f1e185b 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/pos/1.1.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/pos/1.1.fir.kt @@ -51,21 +51,28 @@ fun case_5(value_1: Int, value_2: Int, value_3: Boolean?) { value_2 > 100 -> "2" else -> "3" } - 2 -> when (value_3) { + 2 -> when (value_3) { value_2 > 1000 -> "1" value_2 > 100 -> "2" + else -> "" + } + 3 -> when (value_3) { + else -> "" } - 3 -> when (value_3) {} 4 -> when (value_3) { true -> "1" false -> "2" null -> "3" + else -> "" } - 5 -> when (value_3) { + 5 -> when (value_3) { true -> "1" false -> "2" + else -> "" + } + 6 -> when (value_3) { + else -> "" } - 6 -> when (value_3) {} } } diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/pos/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/pos/1.1.kt index de2ca93c51b..18e62787c4e 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/pos/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/pos/1.1.kt @@ -62,21 +62,27 @@ fun case_5(value_1: Int, value_2: Int, value_3: Boolean?) { value_2 > 100 -> "2" else -> "3" } - 2 -> when (value_3) { + 2 -> when (value_3) { value_2 > 1000 -> "1" value_2 > 100 -> "2" + else -> "" + } + 3 -> when (value_3) { + else -> "" } - 3 -> when (value_3) {} 4 -> when (value_3) { true -> "1" false -> "2" null -> "3" } - 5 -> when (value_3) { + 5 -> when (value_3) { true -> "1" false -> "2" + else -> "" + } + 6 -> when (value_3) { + else -> "" } - 6 -> when (value_3) {} } } diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/1.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/1.2.kt index 7fab328e73b..0f2630881b0 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/1.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/1.2.kt @@ -42,9 +42,10 @@ fun case_3(value_1: SealedClass?): String = when (value_1) { * ISSUES: KT-22996 */ fun case_4(value_1: SealedClass?) { - when (value_1) { + when (value_1) { !is SealedChild2 -> {} // including null is SealedChild2? -> {} // redundant nullable type check + else -> {} } } diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.1.fir.kt index bbadedcf70f..1d2445072a4 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.1.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.1.fir.kt @@ -24,7 +24,7 @@ fun case_2(value_1: Number, value_2: Int) { // TESTCASE NUMBER: 3 fun case_3(value_1: Boolean, value_2: Boolean, value_3: Long) { - when (value_1) { + when (value_1) { value_2 -> {} !value_2 -> {} getBoolean() && value_2 -> {} diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.1.kt index ff1a238cdaa..8856ef81eb6 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.1.kt @@ -34,13 +34,14 @@ fun case_2(value_1: Number, value_2: Int) { // TESTCASE NUMBER: 3 fun case_3(value_1: Boolean, value_2: Boolean, value_3: Long) { - when (value_1) { + when (value_1) { value_2 -> {} !value_2 -> {} getBoolean() && value_2 -> {} getChar() != 'a' -> {} getList() === getAny() -> {} value_3 <= 11 -> {} + else -> {} } } diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.2.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.2.fir.kt index 441d7d60a24..5a91a5723e2 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.2.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.2.fir.kt @@ -18,7 +18,7 @@ fun case_2(value_1: Number, value_2: Int) { // TESTCASE NUMBER: 3 fun case_3(value_1: Boolean, value_2: Boolean, value_3: Long) { - when (value_1) { + when (value_1) { value_2, !value_2, getBoolean() && value_2, getChar() != 'a' -> {} getList() === getAny(), value_3 <= 11 -> {} } diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.2.kt index e6fb3dfa97c..74d9c8ac5a0 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.2.kt @@ -28,9 +28,10 @@ fun case_2(value_1: Number, value_2: Int) { // TESTCASE NUMBER: 3 fun case_3(value_1: Boolean, value_2: Boolean, value_3: Long) { - when (value_1) { + when (value_1) { value_2, !value_2, getBoolean() && value_2, getChar() != 'a' -> {} getList() === getAny(), value_3 <= 11 -> {} + else -> {} } } diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.3.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.3.fir.kt index b9fa9549f26..a36ae8361df 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.3.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.3.fir.kt @@ -8,18 +8,13 @@ package testPackCase1 fun case1(a: A, c: C) { - - a?.b += c - a?.b .plusAssign(c) + a?.b .plusAssign(c) val x = { - a?.b += c - a?.b.plusAssign(c) + a?.b.plusAssign(c) }() - a?.b += { c }() - - a?.b.plusAssign({ c }()) + a?.b.plusAssign({ c }()) } class A(val b: B) diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.3.kt b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.3.kt index 714fcd24d08..ed9f6c20478 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.3.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.3.kt @@ -19,18 +19,13 @@ package testPackCase1 fun case1(a: A, c: C) { - - a?.b += c - a?.b .plusAssign(c) + a.b.plusAssign(c) val x = { - a?.b += c - a?.b.plusAssign(c) + a.b.plusAssign(c) }() - a?.b += { c }() - - a?.b.plusAssign({ c }()) + a.b.plusAssign({ c }()) } class A(val b: B) diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/controlFlow/initialization/neg/3.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/controlFlow/initialization/neg/3.fir.kt index 4688796e33d..ee9a52e409d 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/controlFlow/initialization/neg/3.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/controlFlow/initialization/neg/3.fir.kt @@ -6,7 +6,7 @@ fun case_1(value_1: EnumClass?) { val value_2: Int - when (value_1) { + when (value_1) { EnumClass.NORTH -> funWithExactlyOnceCallsInPlace { value_2 = 1 } EnumClass.SOUTH -> funWithExactlyOnceCallsInPlace { value_2 = 2 } EnumClass.EAST -> funWithExactlyOnceCallsInPlace { value_2 = 4 } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/controlFlow/initialization/neg/3.kt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/controlFlow/initialization/neg/3.kt index 2bf61dafd95..c66999a9c53 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/controlFlow/initialization/neg/3.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/controlFlow/initialization/neg/3.kt @@ -16,11 +16,12 @@ fun case_1(value_1: EnumClass?) { val value_2: Int - when (value_1) { + when (value_1) { EnumClass.NORTH -> funWithExactlyOnceCallsInPlace { value_2 = 1 } EnumClass.SOUTH -> funWithExactlyOnceCallsInPlace { value_2 = 2 } EnumClass.EAST -> funWithExactlyOnceCallsInPlace { value_2 = 4 } null -> funWithExactlyOnceCallsInPlace { value_2 = 5 } + else -> {} } value_2.inc() diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/8.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/8.fir.kt index ae3813dd356..3028943b8af 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/8.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/8.fir.kt @@ -100,7 +100,7 @@ fun case_4(value_1: Number, value_2: (() -> Unit)?) { // TESTCASE NUMBER: 5 fun case_5(value_1: Number?, value_2: String?) { - when (value_2.case_5(value_1)) { + when (value_2.case_5(value_1)) { true -> { println(value_2.length) println(value_1.toByte()) diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/8.kt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/8.kt index 5382790ebc3..93ac456e8d9 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/8.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/8.kt @@ -110,7 +110,7 @@ fun case_4(value_1: Number, value_2: (() -> Unit)?) { // TESTCASE NUMBER: 5 fun case_5(value_1: Number?, value_2: String?) { - when (value_2.case_5(value_1)) { + when (value_2.case_5(value_1)) { true -> { println(value_2.length) println(value_1.toByte()) @@ -119,6 +119,7 @@ fun case_5(value_1: Number?, value_2: String?) { println(value_2.length) println(value_1.inv()) } + else -> {} } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/2.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/2.fir.kt index e59d6aef54c..44103d11882 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/2.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/2.fir.kt @@ -27,7 +27,7 @@ fun case_3(value_1: Any?, value_2: Any?) { fun case_4(value_1: Any?, value_2: Number?) { funWithReturns(value_1 is Float? && value_1 != null && value_2 != null) println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) } // TESTCASE NUMBER: 5 @@ -38,7 +38,7 @@ class case_5_class { val o = case_5_class() funWithReturns(value_1 is Float? && value_1 != null && value_2 != null && o.prop_1 != null) println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) println(o.prop_1.plus(3)) } } @@ -107,19 +107,19 @@ fun case_8(value_1: Any?, value_2: Any?) { fun case_9(value_1: Any?, value_2: Number?) { if (funWithReturnsTrue(value_1 is Float? && value_1 != null && value_2 != null)) { println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) } if (!funWithReturnsFalse(value_1 is Float? && value_1 != null && value_2 != null)) { println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) } if (funWithReturnsNotNull(value_1 is Float? && value_1 != null && value_2 != null) != null) { println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) } if (funWithReturnsNull(value_1 is Float? && value_1 != null && value_2 != null) == null) { println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) } } @@ -131,22 +131,22 @@ class case_10_class { val o = case_10_class() if (funWithReturnsTrue(value_1 is Float? && value_1 != null && value_2 != null && o.prop_1 != null && this.prop_1 != null)) { println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) println(o.prop_1.plus(3)) } if (!funWithReturnsFalse(value_1 is Float? && value_1 != null && value_2 != null && o.prop_1 != null && this.prop_1 != null)) { println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) println(o.prop_1.plus(3)) } if (funWithReturnsNotNull(value_1 is Float? && value_1 != null && value_2 != null && o.prop_1 != null && this.prop_1 != null) != null) { println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) println(o.prop_1.plus(3)) } if (funWithReturnsNull(value_1 is Float? && value_1 != null && value_2 != null && o.prop_1 != null && this.prop_1 != null) == null) { println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) println(o.prop_1.plus(3)) } } @@ -160,5 +160,5 @@ class case_10_class { fun case_11(value_1: Any?, value_2: Any?, value_3: Any?) { funWithReturnsAndInvertCondition(value_1 !is String || value_2 !is Number || value_3 !is Any?) println(value_1!!.length) - println(value_2?.toByte()) + println(value_2?.toByte()) } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/2.kt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/2.kt index 45a57863aa1..3aad83937ca 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/2.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/2.kt @@ -36,7 +36,7 @@ fun case_3(value_1: Any?, value_2: Any?) { fun case_4(value_1: Any?, value_2: Number?) { funWithReturns(value_1 is Float? && value_1 != null && value_2 != null) println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) } // TESTCASE NUMBER: 5 @@ -47,7 +47,7 @@ class case_5_class { val o = case_5_class() funWithReturns(value_1 is Float? && value_1 != null && value_2 != null && o.prop_1 != null) println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) println(o.prop_1.plus(3)) } } @@ -116,19 +116,19 @@ fun case_8(value_1: Any?, value_2: Any?) { fun case_9(value_1: Any?, value_2: Number?) { if (funWithReturnsTrue(value_1 is Float? && value_1 != null && value_2 != null)) { println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) } if (!funWithReturnsFalse(value_1 is Float? && value_1 != null && value_2 != null)) { println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) } if (funWithReturnsNotNull(value_1 is Float? && value_1 != null && value_2 != null) != null) { println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) } if (funWithReturnsNull(value_1 is Float? && value_1 != null && value_2 != null) == null) { println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) } } @@ -140,22 +140,22 @@ class case_10_class { val o = case_10_class() if (funWithReturnsTrue(value_1 is Float? && value_1 != null && value_2 != null && o.prop_1 != null && this.prop_1 != null)) { println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) println(o.prop_1.plus(3)) } if (!funWithReturnsFalse(value_1 is Float? && value_1 != null && value_2 != null && o.prop_1 != null && this.prop_1 != null)) { println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) println(o.prop_1.plus(3)) } if (funWithReturnsNotNull(value_1 is Float? && value_1 != null && value_2 != null && o.prop_1 != null && this.prop_1 != null) != null) { println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) println(o.prop_1.plus(3)) } if (funWithReturnsNull(value_1 is Float? && value_1 != null && value_2 != null && o.prop_1 != null && this.prop_1 != null) == null) { println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) println(o.prop_1.plus(3)) } } @@ -169,5 +169,5 @@ class case_10_class { fun case_11(value_1: Any?, value_2: Any?, value_3: Any?) { funWithReturnsAndInvertCondition(value_1 !is String || value_2 !is Number || value_3 !is Any?) println(value_1!!.length) - println(value_2?.toByte()) + println(value_2?.toByte()) } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/3.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/3.fir.kt index f9215372bb8..5a59d937565 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/3.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/3.fir.kt @@ -103,7 +103,7 @@ class case_3_class { val o = case_3_class() contracts.case_3(value_1, value_2, o.prop_1, this.prop_1) println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) println(o.prop_1.plus(3)) } } @@ -155,22 +155,22 @@ class case_6_class { val o = case_6_class() if (contracts.case_6_1(value_1, value_2, o.prop_1, this.prop_1)) { println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) println(o.prop_1.plus(3)) } if (!contracts.case_6_2(value_1, value_2, o.prop_1, this.prop_1)) { println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) println(o.prop_1.plus(3)) } if (contracts.case_6_3(value_1, value_2, o.prop_1, this.prop_1) != null) { println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) println(o.prop_1.plus(3)) } if (contracts.case_6_4(value_1, value_2, o.prop_1, this.prop_1) == null) { println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) println(o.prop_1.plus(3)) } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/3.kt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/3.kt index 3088b848d9e..2aee5edaf6f 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/3.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/3.kt @@ -111,7 +111,7 @@ class case_3_class { val o = case_3_class() contracts.case_3(value_1, value_2, o.prop_1, this.prop_1) println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) println(o.prop_1.plus(3)) } } @@ -163,22 +163,22 @@ class case_6_class { val o = case_6_class() if (contracts.case_6_1(value_1, value_2, o.prop_1, this.prop_1)) { println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) println(o.prop_1.plus(3)) } if (!contracts.case_6_2(value_1, value_2, o.prop_1, this.prop_1)) { println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) println(o.prop_1.plus(3)) } if (contracts.case_6_3(value_1, value_2, o.prop_1, this.prop_1) != null) { println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) println(o.prop_1.plus(3)) } if (contracts.case_6_4(value_1, value_2, o.prop_1, this.prop_1) == null) { println(value_1.dec()) - println(value_2?.toByte()) + println(value_2?.toByte()) println(o.prop_1.plus(3)) } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/8.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/8.fir.kt index b582fcaa156..6a85310a0cc 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/8.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/8.fir.kt @@ -105,7 +105,7 @@ fun case_4(value_1: Number, value_2: (() -> Unit)?) { * ISSUES: KT-26612 */ fun case_5(value_1: Number?, value_2: String?) { - when (value_2.case_5(value_1)) { + when (value_2.case_5(value_1)) { true -> { println(value_2.length) println(value_1.toByte()) diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/8.kt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/8.kt index 932dcf3f914..24320e5a7bb 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/8.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos/8.kt @@ -115,7 +115,7 @@ fun case_4(value_1: Number, value_2: (() -> Unit)?) { * ISSUES: KT-26612 */ fun case_5(value_1: Number?, value_2: String?) { - when (value_2.case_5(value_1)) { + when (value_2.case_5(value_1)) { true -> { println(value_2.length) println(value_1.toByte()) @@ -124,6 +124,7 @@ fun case_5(value_1: Number?, value_2: String?) { println(value_2.length) println(value_1.inv()) } + else -> {} } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/2.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/2.fir.kt index 798b7274fd8..f0581369fc6 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/2.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/2.fir.kt @@ -38,7 +38,7 @@ fun case_4(x: Any) { fun case_5(x: Any?) { if (!(x !is Nothing?)) { x - x?.inv() + x?.inv() } } @@ -70,7 +70,7 @@ fun case_8(x: Any?) { fun case_9(x: Any?) { if (!!(x !is Nothing?)) else { x - x?.inv() + x?.inv() } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/30.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/30.fir.kt index 0a7837557d3..15b71e91636 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/30.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/30.fir.kt @@ -53,7 +53,7 @@ fun case_3(x: Class?) { * ISSUES: KT-30376 */ fun case_4(x: Class?) { - if (x!!?.prop_8?.prop_8?.prop_8?.prop_8 == null == true) else { + if (x!!?.prop_8?.prop_8?.prop_8?.prop_8 == null == true) else { x x.prop_8 x.prop_8.prop_8 @@ -68,7 +68,7 @@ fun case_4(x: Class?) { * ISSUES: KT-30376 */ fun case_5(x: Class?) { - if (x?.prop_8!!?.prop_8?.prop_8?.prop_8 == null == true) else { + if (x?.prop_8!!?.prop_8?.prop_8?.prop_8 == null == true) else { x x.prop_8 x.prop_8.prop_8 @@ -83,7 +83,7 @@ fun case_5(x: Class?) { * ISSUES: KT-30376 */ fun case_6(x: Class?) { - if (x?.prop_8?.prop_8?.prop_8!!?.prop_8 == null == true) else { + if (x?.prop_8?.prop_8?.prop_8!!?.prop_8 == null == true) else { x x.prop_8 x.prop_8.prop_8 diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/30.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/30.kt index 7edcc52a7a2..0d75ed3143f 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/30.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/30.kt @@ -62,7 +62,7 @@ fun case_3(x: Class?) { * ISSUES: KT-30376 */ fun case_4(x: Class?) { - if (x!!?.prop_8?.prop_8?.prop_8?.prop_8 == null == true) else { + if (x!!?.prop_8?.prop_8?.prop_8?.prop_8 == null == true) else { x x.prop_8 x.prop_8.prop_8 @@ -77,7 +77,7 @@ fun case_4(x: Class?) { * ISSUES: KT-30376 */ fun case_5(x: Class?) { - if (x?.prop_8!!?.prop_8?.prop_8?.prop_8 == null == true) else { + if (x?.prop_8!!?.prop_8?.prop_8?.prop_8 == null == true) else { x x.prop_8 x.prop_8.prop_8 @@ -92,7 +92,7 @@ fun case_5(x: Class?) { * ISSUES: KT-30376 */ fun case_6(x: Class?) { - if (x?.prop_8?.prop_8?.prop_8!!?.prop_8 == null == true) else { + if (x?.prop_8?.prop_8?.prop_8!!?.prop_8 == null == true) else { x x.prop_8 x.prop_8.prop_8 diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/54.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/54.fir.kt index ad56e982876..3c99e4e7557 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/54.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/54.fir.kt @@ -137,7 +137,7 @@ fun case_7() { var b = a b b.length - when (true) { + when (true) { true -> b = a } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/54.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/54.kt index 0475afbb4e7..1fece923ea7 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/54.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/54.kt @@ -146,8 +146,9 @@ fun case_7() { var b = a b b.length - when (true) { + when (true) { true -> b = a + else -> {} } b diff --git a/compiler/util/src/org/jetbrains/kotlin/config/LanguageVersionSettings.kt b/compiler/util/src/org/jetbrains/kotlin/config/LanguageVersionSettings.kt index c3edac43eb9..6c33f9a07d8 100644 --- a/compiler/util/src/org/jetbrains/kotlin/config/LanguageVersionSettings.kt +++ b/compiler/util/src/org/jetbrains/kotlin/config/LanguageVersionSettings.kt @@ -403,7 +403,7 @@ enum class LanguageVersion(val major: Int, val minor: Int) : DescriptionAware, L str.split(".", "-").let { if (it.size >= 2) fromVersionString("${it[0]}.${it[1]}") else null } // Version status - // 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 + // 1.0 1.1 1.2 1.3 1.4 1.5..1.7 1.8 1.9 // Language: UNSUPPORTED --> DEPRECATED ------> STABLE ---> EXPERIMENTAL // API: UNSUPPORTED --> DEPRECATED ------> STABLE ---> EXPERIMENTAL @@ -417,7 +417,7 @@ enum class LanguageVersion(val major: Int, val minor: Int) : DescriptionAware, L val FIRST_NON_DEPRECATED = KOTLIN_1_5 @JvmField - val LATEST_STABLE = KOTLIN_1_6 + val LATEST_STABLE = KOTLIN_1_7 } } diff --git a/core/metadata.jvm/src/org/jetbrains/kotlin/metadata/jvm/deserialization/JvmMetadataVersion.kt b/core/metadata.jvm/src/org/jetbrains/kotlin/metadata/jvm/deserialization/JvmMetadataVersion.kt index d4e7e0f3bb1..8d4ed112f7c 100644 --- a/core/metadata.jvm/src/org/jetbrains/kotlin/metadata/jvm/deserialization/JvmMetadataVersion.kt +++ b/core/metadata.jvm/src/org/jetbrains/kotlin/metadata/jvm/deserialization/JvmMetadataVersion.kt @@ -26,7 +26,7 @@ class JvmMetadataVersion(versionArray: IntArray, val isStrictSemantics: Boolean) companion object { @JvmField - val INSTANCE = JvmMetadataVersion(1, 6, 0) + val INSTANCE = JvmMetadataVersion(1, 7, 0) @JvmField val INVALID_VERSION = JvmMetadataVersion() diff --git a/gradle.properties b/gradle.properties index b2b9a25958e..205c9fba2d6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ systemProp.org.gradle.internal.http.connectionTimeout=90000 systemProp.org.gradle.internal.http.socketTimeout=90000 cacheRedirectorEnabled=true -defaultSnapshotVersion=1.6.255-SNAPSHOT +defaultSnapshotVersion=1.7.255-SNAPSHOT #maven.repository.mirror=http://repository.jetbrains.com/remote-repos/ #bootstrap.kotlin.repo=https://maven.pkg.jetbrains.space/kotlin/p/kotlin/bootstrap diff --git a/libraries/stdlib/src/kotlin/util/KotlinVersion.kt b/libraries/stdlib/src/kotlin/util/KotlinVersion.kt index 1638cba9467..4932fcb1563 100644 --- a/libraries/stdlib/src/kotlin/util/KotlinVersion.kt +++ b/libraries/stdlib/src/kotlin/util/KotlinVersion.kt @@ -79,5 +79,5 @@ public class KotlinVersion(val major: Int, val minor: Int, val patch: Int) : Com // this class is ignored during classpath normalization when considering whether to recompile dependencies in Kotlin build private object KotlinVersionCurrentValue { @kotlin.jvm.JvmStatic - fun get(): KotlinVersion = KotlinVersion(1, 6, 255) // value is written here automatically during build + fun get(): KotlinVersion = KotlinVersion(1, 7, 255) // value is written here automatically during build } \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin-api/src/main/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinCommonOptions.kt b/libraries/tools/kotlin-gradle-plugin-api/src/main/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinCommonOptions.kt index a874f8c8a2b..4e0525d0b29 100644 --- a/libraries/tools/kotlin-gradle-plugin-api/src/main/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinCommonOptions.kt +++ b/libraries/tools/kotlin-gradle-plugin-api/src/main/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinCommonOptions.kt @@ -7,14 +7,14 @@ interface KotlinCommonOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonToo /** * Allow using declarations only from the specified version of bundled libraries - * Possible values: "1.3 (DEPRECATED)", "1.4 (DEPRECATED)", "1.5", "1.6", "1.7 (EXPERIMENTAL)", "1.8 (EXPERIMENTAL)", "1.9 (EXPERIMENTAL)" + * Possible values: "1.3 (DEPRECATED)", "1.4 (DEPRECATED)", "1.5", "1.6", "1.7", "1.8 (EXPERIMENTAL)", "1.9 (EXPERIMENTAL)" * Default value: null */ var apiVersion: kotlin.String? /** * Provide source compatibility with the specified version of Kotlin - * Possible values: "1.3 (DEPRECATED)", "1.4 (DEPRECATED)", "1.5", "1.6", "1.7 (EXPERIMENTAL)", "1.8 (EXPERIMENTAL)", "1.9 (EXPERIMENTAL)" + * Possible values: "1.3 (DEPRECATED)", "1.4 (DEPRECATED)", "1.5", "1.6", "1.7", "1.8 (EXPERIMENTAL)", "1.9 (EXPERIMENTAL)" * Default value: null */ var languageVersion: kotlin.String? @@ -24,4 +24,4 @@ interface KotlinCommonOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonToo * Default value: false */ var useFir: kotlin.Boolean -} +} \ No newline at end of file