diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/FirIdeSpecTest.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/FirIdeSpecTest.java index 84c9b3a6608..b73333a9d1c 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/FirIdeSpecTest.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/FirIdeSpecTest.java @@ -3016,6 +3016,22 @@ public class FirIdeSpecTest extends AbstractDiagnosisCompilerTestDataSpecTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } + @Nested + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/neg") + @TestDataPath("$PROJECT_ROOT") + public class Neg { + @Test + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/neg/1.1.kt"); + } + + @Test + public void testAllFilesPresentInNeg() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + } + @Nested @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/pos") @TestDataPath("$PROJECT_ROOT") @@ -3076,6 +3092,18 @@ public class FirIdeSpecTest extends AbstractDiagnosisCompilerTestDataSpecTest { runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/3.2.kt"); } + @Test + @TestMetadata("5.1.kt") + public void test5_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/5.1.kt"); + } + + @Test + @TestMetadata("5.2.kt") + public void test5_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/5.2.kt"); + } + @Test @TestMetadata("7.1.kt") public void test7_1() throws Exception { diff --git a/buildSrc/src/main/kotlin/checkExpectedGradlePropertyValues.kt b/buildSrc/src/main/kotlin/checkExpectedGradlePropertyValues.kt index d1cf0f284e6..0f1ae687125 100644 --- a/buildSrc/src/main/kotlin/checkExpectedGradlePropertyValues.kt +++ b/buildSrc/src/main/kotlin/checkExpectedGradlePropertyValues.kt @@ -18,7 +18,7 @@ import org.gradle.api.Project * * e.g. if a developer set's * - * `defaultSnapshotVersion.kotlin_build.expected_value=1.6.255-SNAPSHOT` and the value gets bumped to `1.7.255-SNAPSHOT` after pulling from master, + * `defaultSnapshotVersion.kotlin_build.expected_value=1.6.255-SNAPSHOT` and the value gets bumped to `1.8.255-SNAPSHOT` after pulling from master, * the developer will notice this during project configuration phase. */ fun Project.checkExpectedGradlePropertyValues() { 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 05a540b2823..a695625077a 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/state/GenerationState.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/state/GenerationState.kt @@ -435,8 +435,8 @@ class GenerationState private constructor( this[KOTLIN_1_4] = JvmMetadataVersion(1, 4, 3) this[KOTLIN_1_5] = JvmMetadataVersion(1, 5, 1) 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_7] = JvmMetadataVersion(1, 7, 0) + this[KOTLIN_1_8] = JvmMetadataVersion.INSTANCE this[KOTLIN_1_9] = JvmMetadataVersion(1, 9, 0) check(size == LanguageVersion.values().size) { diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticTestSpecGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticTestSpecGenerated.java index ca5d14810a7..77445a7c857 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticTestSpecGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticTestSpecGenerated.java @@ -3016,6 +3016,22 @@ public class FirDiagnosticTestSpecGenerated extends AbstractFirDiagnosticTestSpe KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } + @Nested + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/neg") + @TestDataPath("$PROJECT_ROOT") + public class Neg { + @Test + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/neg/1.1.kt"); + } + + @Test + public void testAllFilesPresentInNeg() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + } + @Nested @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/pos") @TestDataPath("$PROJECT_ROOT") @@ -3076,6 +3092,18 @@ public class FirDiagnosticTestSpecGenerated extends AbstractFirDiagnosticTestSpe runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/3.2.kt"); } + @Test + @TestMetadata("5.1.kt") + public void test5_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/5.1.kt"); + } + + @Test + @TestMetadata("5.2.kt") + public void test5_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/5.2.kt"); + } + @Test @TestMetadata("7.1.kt") public void test7_1() throws Exception { diff --git a/compiler/testData/builtin-classes/java8/kotlin-collections.txt b/compiler/testData/builtin-classes/java8/kotlin-collections.txt index a4347fb8c75..7a944648199 100644 --- a/compiler/testData/builtin-classes/java8/kotlin-collections.txt +++ b/compiler/testData/builtin-classes/java8/kotlin-collections.txt @@ -224,14 +224,14 @@ public interface MutableMap : kotlin.collections.Map { public abstract fun clear(): kotlin.Unit public open fun compute(/*0*/ p0: K, /*1*/ p1: java.util.function.BiFunction): V? public open fun computeIfAbsent(/*0*/ p0: K, /*1*/ p1: java.util.function.Function): V - public open fun computeIfPresent(/*0*/ p0: K, /*1*/ p1: java.util.function.BiFunction): V? + public open fun computeIfPresent(/*0*/ p0: K, /*1*/ p1: java.util.function.BiFunction): V? public abstract override /*1*/ /*fake_override*/ fun containsKey(/*0*/ key: K): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun containsValue(/*0*/ value: V): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun forEach(/*0*/ p0: java.util.function.BiConsumer): kotlin.Unit public abstract override /*1*/ /*fake_override*/ fun get(/*0*/ key: K): V? @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.PlatformDependent public open override /*1*/ /*fake_override*/ fun getOrDefault(/*0*/ key: K, /*1*/ defaultValue: V): V public abstract override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean - public open fun merge(/*0*/ p0: K, /*1*/ p1: V, /*2*/ p2: java.util.function.BiFunction): V? + public open fun merge(/*0*/ p0: K, /*1*/ p1: V & Any, /*2*/ p2: java.util.function.BiFunction): V? public abstract fun put(/*0*/ key: K, /*1*/ value: V): V? public abstract fun putAll(/*0*/ from: kotlin.collections.Map): kotlin.Unit public open fun putIfAbsent(/*0*/ p0: K, /*1*/ p1: V): V? diff --git a/compiler/testData/cli/jvm/apiVersionInvalid.out b/compiler/testData/cli/jvm/apiVersionInvalid.out index f9406fbf0ee..15ae5270bdb 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, 1.8 (experimental), 1.9 (experimental) +Supported API versions: 1.3 (deprecated), 1.4 (deprecated), 1.5, 1.6, 1.7, 1.8, 1.9 (experimental) COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/firDfa.out b/compiler/testData/cli/jvm/firDfa.out index ffcff5c3b33..aa5a5eee9b7 100644 --- a/compiler/testData/cli/jvm/firDfa.out +++ b/compiler/testData/cli/jvm/firDfa.out @@ -1,4 +1,7 @@ warning: ATTENTION! This build uses experimental K2 compiler: -Xuse-k2 +compiler/testData/cli/jvm/firDfa.kt:3:10: warning: unnecessary non-null assertion (!!) on a non-null receiver of type kotlin/String + x!!.length + ^ OK diff --git a/compiler/testData/cli/jvm/languageVersionInvalid.out b/compiler/testData/cli/jvm/languageVersionInvalid.out index b9361f1dc4b..ea87111ca1c 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, 1.8 (experimental), 1.9 (experimental) +Supported language versions: 1.3 (deprecated), 1.4 (deprecated), 1.5, 1.6, 1.7, 1.8, 1.9 (experimental) COMPILATION_ERROR diff --git a/compiler/testData/codegen/box/platformTypes/kt49209.kt b/compiler/testData/codegen/box/platformTypes/kt49209.kt index eeaf3656271..08f243d4deb 100644 --- a/compiler/testData/codegen/box/platformTypes/kt49209.kt +++ b/compiler/testData/codegen/box/platformTypes/kt49209.kt @@ -1,13 +1,11 @@ // TARGET_BACKEND: JVM -// IGNORE_BACKEND_FIR: JVM_IR -// FIR status: RETURN_TYPE_MISMATCH on toOptional: expected Optional, actual @EN Optional<@EN T & Any> // IGNORE_BACKEND: ANDROID // JVM_TARGET: 1.8 // FULL_JDK import java.util.Optional -fun T?.toOptional(): Optional = Optional.ofNullable(this) +fun T?.toOptional(): Optional = Optional.ofNullable(this) fun box(): String { return "OK".toOptional().get() diff --git a/compiler/testData/compileJavaAgainstKotlin/class/ImplementsMapPP.txt b/compiler/testData/compileJavaAgainstKotlin/class/ImplementsMapPP.txt index 7b8d42c9e1e..d7a10ccd936 100644 --- a/compiler/testData/compileJavaAgainstKotlin/class/ImplementsMapPP.txt +++ b/compiler/testData/compileJavaAgainstKotlin/class/ImplementsMapPP.txt @@ -9,7 +9,7 @@ public abstract class Mine : java.util.Map { public abstract /*fake_override*/ fun clear(): kotlin.Unit public open /*fake_override*/ fun compute(/*0*/ P2, /*1*/ java.util.function.BiFunction): P1? public open /*fake_override*/ fun computeIfAbsent(/*0*/ P2, /*1*/ java.util.function.Function): P1 - public open /*fake_override*/ fun computeIfPresent(/*0*/ P2, /*1*/ java.util.function.BiFunction): P1? + public open /*fake_override*/ fun computeIfPresent(/*0*/ P2, /*1*/ java.util.function.BiFunction): P1? public abstract /*fake_override*/ fun containsKey(/*0*/ kotlin.Any!): kotlin.Boolean public abstract /*fake_override*/ fun containsValue(/*0*/ kotlin.Any!): kotlin.Boolean public abstract /*fake_override*/ fun entrySet(): kotlin.collections.(Mutable)Set!>! @@ -18,7 +18,7 @@ public abstract class Mine : java.util.Map { public open /*fake_override*/ fun getOrDefault(/*0*/ kotlin.Any!, /*1*/ P1!): P1! public abstract /*fake_override*/ fun isEmpty(): kotlin.Boolean public abstract /*fake_override*/ fun keySet(): kotlin.collections.(Mutable)Set! - public open /*fake_override*/ fun merge(/*0*/ P2, /*1*/ P1, /*2*/ java.util.function.BiFunction): P1? + public open /*fake_override*/ fun merge(/*0*/ P2, /*1*/ P1 & Any, /*2*/ java.util.function.BiFunction): P1? public abstract /*fake_override*/ fun put(/*0*/ P2!, /*1*/ P1!): P1! public abstract /*fake_override*/ fun putAll(/*0*/ (kotlin.collections.MutableMap..kotlin.collections.Map?)): kotlin.Unit public open /*fake_override*/ fun putIfAbsent(/*0*/ P2, /*1*/ P1): P1? diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/output.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/output.txt index d248e58533d..d039f53b5f2 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.7. 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.8. 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.7 +compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:13: error: 'A' is only available since Kotlin 40.34 and cannot be used in Kotlin 1.8 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.7 +compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlin/source.kt:3:13: error: 'A' is only available since Kotlin 45.35 and cannot be used in Kotlin 1.8 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.7. 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.8. 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.7 +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.8 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.7 +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.8 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.7. 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.8. 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.7 +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.8 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.7 +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.8 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.7. 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.8. 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.7 +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.8 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.7 +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.8 return p ^ COMPILATION_ERROR diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClasses/output.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClasses/output.txt index 84559521948..af3804cc3a9 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.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.8 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.7 +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.8 a.f() ^ COMPILATION_ERROR diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesAgainst14Js/output.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesAgainst14Js/output.txt index a8b3e278436..84c313ae9ed 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.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.8 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.7 +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.8 a.f() ^ COMPILATION_ERROR diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesJs/output.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/requireKotlinInNestedClassesJs/output.txt index 09087d1cf68..08acd72636d 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.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.8 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.7 +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.8 a.f() ^ COMPILATION_ERROR diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/output.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/strictMetadataVersionSemanticsOldVersion/output.txt index baddeb648a6..7c3f590c5d9 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.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$. +$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.9.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.9.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.8.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.9.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.8.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.9.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.8.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.9.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 57461773af5..4bb1ce8d937 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/checkerFramework.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/checkerFramework.txt @@ -6,7 +6,7 @@ public open class A { public constructor A() @org.checkerframework.checker.nullness.qual.Nullable public final var field: @org.checkerframework.checker.nullness.qual.Nullable kotlin.String? @org.checkerframework.checker.nullness.qual.NonNull public open fun bar(): @org.checkerframework.checker.nullness.qual.NonNull kotlin.String - @org.checkerframework.checker.nullness.qual.Nullable public open fun baz(/*0*/ @org.checkerframework.checker.nullness.qual.NonNull x: @org.checkerframework.checker.nullness.qual.NonNull T): @org.checkerframework.checker.nullness.qual.Nullable T? + @org.checkerframework.checker.nullness.qual.Nullable public open fun baz(/*0*/ @org.checkerframework.checker.nullness.qual.NonNull x: @org.checkerframework.checker.nullness.qual.NonNull T & Any): @org.checkerframework.checker.nullness.qual.Nullable T? public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @org.checkerframework.checker.nullness.qual.Nullable public open fun foo(/*0*/ @org.checkerframework.checker.nullness.qual.NonNull x: @org.checkerframework.checker.nullness.qual.NonNull kotlin.String, /*1*/ @org.checkerframework.checker.nullness.qual.Nullable y: @org.checkerframework.checker.nullness.qual.Nullable kotlin.CharSequence?): @org.checkerframework.checker.nullness.qual.Nullable kotlin.String? public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/eclipse.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/eclipse.txt index 1e69d6273a6..b9f6a08e7c2 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/eclipse.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/eclipse.txt @@ -6,7 +6,7 @@ public open class A { public constructor A() @org.eclipse.jdt.annotation.Nullable public final var field: @org.eclipse.jdt.annotation.Nullable kotlin.String? @org.eclipse.jdt.annotation.NonNull public open fun bar(): @org.eclipse.jdt.annotation.NonNull kotlin.String - @org.eclipse.jdt.annotation.Nullable public open fun baz(/*0*/ @org.eclipse.jdt.annotation.NonNull x: @org.eclipse.jdt.annotation.NonNull T): @org.eclipse.jdt.annotation.Nullable T? + @org.eclipse.jdt.annotation.Nullable public open fun baz(/*0*/ @org.eclipse.jdt.annotation.NonNull x: @org.eclipse.jdt.annotation.NonNull T & Any): @org.eclipse.jdt.annotation.Nullable T? public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @org.eclipse.jdt.annotation.Nullable public open fun foo(/*0*/ @org.eclipse.jdt.annotation.NonNull x: @org.eclipse.jdt.annotation.NonNull kotlin.String, /*1*/ @org.eclipse.jdt.annotation.Nullable y: @org.eclipse.jdt.annotation.Nullable kotlin.CharSequence?): @org.eclipse.jdt.annotation.Nullable kotlin.String? public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/NullnessUnspecifiedTypeParameter.fir.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/NullnessUnspecifiedTypeParameter.fir.kt deleted file mode 100644 index 125c8aeea6d..00000000000 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/NullnessUnspecifiedTypeParameter.fir.kt +++ /dev/null @@ -1,36 +0,0 @@ -// JSPECIFY_STATE: strict - -// FILE: NullnessUnspecifiedTypeParameter.java -import org.jspecify.nullness.*; - -@NullMarked -public class NullnessUnspecifiedTypeParameter { - public void foo(T t) {} - - public void bar(Test s, T t) {} // t should not become not nullable -} - -// FILE: Test.java -public class Test {} - -// FILE: main.kt -// jspecify_nullness_mismatch -fun main(a1: NullnessUnspecifiedTypeParameter, a2: NullnessUnspecifiedTypeParameter<Any?>, x: Test): Unit { - // jspecify_nullness_mismatch - a1.foo(null) - a1.foo(1) - - a2.foo(null) - a2.foo(1) - - // jspecify_nullness_mismatch, jspecify_nullness_mismatch - a1.bar(null, null) - // jspecify_nullness_mismatch - a1.bar(x, null) - a1.bar(x, 1) - - // jspecify_nullness_mismatch - a2.bar(null, null) - a2.bar(x, null) - a2.bar(x, 1) -} diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/NullnessUnspecifiedTypeParameter.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/NullnessUnspecifiedTypeParameter.kt index a015835f3be..1949ce04670 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/NullnessUnspecifiedTypeParameter.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/NullnessUnspecifiedTypeParameter.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // JSPECIFY_STATE: strict // FILE: NullnessUnspecifiedTypeParameter.java @@ -20,8 +21,7 @@ fun main(a1: NullnessUnspecifiedTypeParameter, a2: NullnessUnspecifiedTypeP a1.foo(null) a1.foo(1) - // jspecify_nullness_mismatch - a2.foo(null) + a2.foo(null) a2.foo(1) // jspecify_nullness_mismatch, jspecify_nullness_mismatch @@ -30,9 +30,8 @@ fun main(a1: NullnessUnspecifiedTypeParameter, a2: NullnessUnspecifiedTypeP a1.bar(x, null) a1.bar(x, 1) - // jspecify_nullness_mismatch, jspecify_nullness_mismatch - a2.bar(null, null) // jspecify_nullness_mismatch - a2.bar(x, null) + a2.bar(null, null) + a2.bar(x, null) a2.bar(x, 1) } diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/SelfType.fir.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/SelfType.fir.kt deleted file mode 100644 index edb34a9cc8f..00000000000 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/SelfType.fir.kt +++ /dev/null @@ -1,56 +0,0 @@ -// JSPECIFY_STATE: strict - -// FILE: SelfType.java -import org.jspecify.nullness.*; - -@NullMarked -public class SelfType> { - public void foo(T t) {} -} - -// FILE: B.java -public class B extends SelfType {} - -// FILE: C.java -import org.jspecify.nullness.*; - -@NullMarked -public class C> extends SelfType {} - -// FILE: AK.java -public class AK extends SelfType {} - -// FILE: AKN.java -import org.jspecify.nullness.*; - -public class AKN extends SelfType<@Nullable AK> {} - -// FILE: BK.java -public class BK extends B {} - -// FILE: CK.java -public class CK extends C {} - -// FILE: CKN.java -import org.jspecify.nullness.*; - -public class CKN extends C<@Nullable CK> {} - -// FILE: main.kt -fun main(ak: AK, akn: AKN, bk: BK, ck: CK, ckn: CKN): Unit { - ak.foo(ak) - // jspecify_nullness_mismatch - ak.foo(null) - - akn.foo(null) - - bk.foo(bk) - // jspecify_nullness_mismatch - bk.foo(null) - - ck.foo(ck) - // jspecify_nullness_mismatch - ck.foo(null) - - ckn.foo(null) -} diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/SelfType.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/SelfType.kt index 98ac27083e7..f48a72fa369 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/SelfType.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/SelfType.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // JSPECIFY_STATE: strict // FILE: SelfType.java @@ -42,8 +43,7 @@ fun main(ak: AK, akn: AKN, bk: BK, ck: CK, ckn: CKN): Unit { // jspecify_nullness_mismatch ak.foo(null) - // jspecify_nullness_mismatch - akn.foo(null) + akn.foo(null) bk.foo(bk) // jspecify_nullness_mismatch @@ -53,6 +53,5 @@ fun main(ak: AK, akn: AKN, bk: BK, ck: CK, ckn: CKN): Unit { // jspecify_nullness_mismatch ck.foo(null) - // jspecify_nullness_mismatch - ckn.foo(null) + ckn.foo(null) } diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/SelfType.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/SelfType.txt index 876a46667ac..98ad1600a9b 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/SelfType.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/SelfType.txt @@ -13,7 +13,7 @@ public open class AK : SelfType { public open class AKN : SelfType<@org.jspecify.nullness.Nullable AK?> { public constructor AKN() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun foo(/*0*/ t: @org.jspecify.nullness.Nullable AK): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun foo(/*0*/ t: @org.jspecify.nullness.Nullable AK?): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } @@ -53,7 +53,7 @@ public open class CK : C { public open class CKN : C<@org.jspecify.nullness.Nullable CK?> { public constructor CKN() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun foo(/*0*/ t: @org.jspecify.nullness.Nullable CK): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun foo(/*0*/ t: @org.jspecify.nullness.Nullable CK?): kotlin.Unit 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/TypeParameterBounds.fir.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/TypeParameterBounds.fir.kt deleted file mode 100644 index 468edc2c8cc..00000000000 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/TypeParameterBounds.fir.kt +++ /dev/null @@ -1,46 +0,0 @@ -// JSPECIFY_STATE: strict - -// FILE: A.java -import org.jspecify.nullness.*; - -@NullMarked -public class A { - public void foo(@NullnessUnspecified T t) {} - public void bar(E e) {} -} - -// FILE: B.java -import org.jspecify.nullness.*; -@NullMarked -public class B { - public void foo(T t) {} - public void bar(E e) {} -} - -// FILE: Test.java -public class Test {} - -// FILE: main.kt -// jspecify_nullness_mismatch, jspecify_nullness_mismatch -fun main(a1: A<Any?>, a2: A, b1: B<Any?>, b2: B, x: T): Unit { - a1.foo(null) - // jspecify_nullness_mismatch, jspecify_nullness_mismatch - a1.bar<T?>(null) - a1.bar(x) - - a2.foo(null) - // jspecify_nullness_mismatch, jspecify_nullness_mismatch - a2.bar<T?>(null) - a2.bar(x) - - b1.foo(null) - // jspecify_nullness_mismatch, jspecify_nullness_mismatch - b1.bar<T?>(null) - b1.bar(x) - - // jspecify_nullness_mismatch - b2.foo(null) - // jspecify_nullness_mismatch, jspecify_nullness_mismatch - b2.bar<T?>(null) - b2.bar(x) -} diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/TypeParameterBounds.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/TypeParameterBounds.kt index 0453bdfe237..d29cf6c75c8 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/TypeParameterBounds.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/TypeParameterBounds.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // JSPECIFY_STATE: strict // FILE: A.java @@ -33,8 +34,7 @@ fun main(a1: A<Any?>, a2: A, b1: B<< a2.bar<T?>(null) a2.bar(x) - // jspecify_nullness_mismatch - b1.foo(null) + b1.foo(null) // jspecify_nullness_mismatch, jspecify_nullness_mismatch b1.bar<T?>(null) b1.bar(x) diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/SelfType.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/SelfType.kt index ce78cab1543..75d7e674766 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/SelfType.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/SelfType.kt @@ -43,7 +43,8 @@ fun main(ak: AK, akn: AKN, bk: BK, ck: CK, ckn: CKN): Unit { // jspecify_nullness_mismatch ak.foo(null) - akn.foo(null) // the corresponding warning/error is present on the Java side + // jspecify_nullness_mismatch + akn.foo(null) // the corresponding warning/error is present on the Java side bk.foo(bk) // jspecify_nullness_mismatch @@ -53,5 +54,6 @@ fun main(ak: AK, akn: AKN, bk: BK, ck: CK, ckn: CKN): Unit { // jspecify_nullness_mismatch ck.foo(null) - ckn.foo(null) // the corresponding warning/error is present on the Java side + // jspecify_nullness_mismatch + ckn.foo(null) // the corresponding warning/error is present on the Java side } diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/TypeParameterBounds.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/TypeParameterBounds.kt index c2aa20fbe18..c56d8c881c4 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/TypeParameterBounds.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/warnMode/TypeParameterBounds.kt @@ -23,24 +23,24 @@ public class Test {} // jspecify_nullness_mismatch, jspecify_nullness_mismatch fun main(a1: A<Any?>, a2: A, b1: B<Any?>, b2: B, x: T): Unit { a1.foo(null) - // jspecify_nullness_mismatch - a1.bar<T?>(null) + // jspecify_nullness_mismatch, jspecify_nullness_mismatch + a1.bar<T?>(null) a1.bar(x) a2.foo(null) - // jspecify_nullness_mismatch - a2.bar<T?>(null) + // jspecify_nullness_mismatch, jspecify_nullness_mismatch + a2.bar<T?>(null) a2.bar(x) // jspecify_nullness_mismatch b1.foo(null) - // jspecify_nullness_mismatch - b1.bar<T?>(null) + // jspecify_nullness_mismatch, jspecify_nullness_mismatch + b1.bar<T?>(null) b1.bar(x) // jspecify_nullness_mismatch b2.foo(null) - // jspecify_nullness_mismatch - b2.bar<T?>(null) + // jspecify_nullness_mismatch, jspecify_nullness_mismatch + b2.bar<T?>(null) b2.bar(x) } diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jsr305/typeArguments.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jsr305/typeArguments.txt index 4f1c92b35ce..3d5e25c91b0 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jsr305/typeArguments.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jsr305/typeArguments.txt @@ -16,10 +16,10 @@ public open class L!, /*1*/ S : kotlin.Any!>() 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 s(): S - public open fun setS(/*0*/ s: S): kotlin.Unit + public open fun s(): S & Any + public open fun setS(/*0*/ s: S & Any): kotlin.Unit public open fun setT(/*0*/ @spr.Nullable t: @spr.Nullable T?): kotlin.Unit - public open fun t(): T + public open fun t(): T & Any public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } @@ -62,10 +62,10 @@ package test { public constructor L!, /*1*/ S : kotlin.Any!>() 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 s(): S - public open fun setS(/*0*/ s: S): kotlin.Unit + public open fun s(): S & Any + public open fun setS(/*0*/ s: S & Any): kotlin.Unit public open fun setT(/*0*/ @spr.Nullable t: @spr.Nullable T?): kotlin.Unit - public open fun t(): T + public open fun t(): T & Any public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } } diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/kt48261.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/kt48261.txt index 7dfe5b68072..153d0ed36c4 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/kt48261.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/kt48261.txt @@ -32,38 +32,38 @@ public abstract class MyCollection : java.util.AbstractCo invisible_fake open override /*1*/ /*fake_override*/ fun hugeCapacity(/*0*/ p0: kotlin.Int): kotlin.Int } -public abstract class MyList : MyCollection, kotlin.collections.MutableList<@org.jetbrains.annotations.NotNull E> { +public abstract class MyList : MyCollection, kotlin.collections.MutableList<@org.jetbrains.annotations.NotNull E & Any> { public constructor MyList() public abstract override /*2*/ /*fake_override*/ val size: kotlin.Int - public open override /*2*/ /*fake_override*/ fun add(/*0*/ element: E): kotlin.Boolean - public abstract override /*1*/ /*fake_override*/ fun add(/*0*/ index: kotlin.Int, /*1*/ element: @org.jetbrains.annotations.NotNull E): kotlin.Unit - public abstract override /*1*/ /*fake_override*/ fun addAll(/*0*/ index: kotlin.Int, /*1*/ elements: kotlin.collections.Collection<@org.jetbrains.annotations.NotNull E>): kotlin.Boolean - public open override /*2*/ /*fake_override*/ fun addAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*2*/ /*fake_override*/ fun add(/*0*/ element: E & Any): kotlin.Boolean + public abstract override /*1*/ /*fake_override*/ fun add(/*0*/ index: kotlin.Int, /*1*/ element: @org.jetbrains.annotations.NotNull E & Any): kotlin.Unit + public abstract override /*1*/ /*fake_override*/ fun addAll(/*0*/ index: kotlin.Int, /*1*/ elements: kotlin.collections.Collection<@org.jetbrains.annotations.NotNull E & Any>): kotlin.Boolean + public open override /*2*/ /*fake_override*/ fun addAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun clear(): kotlin.Unit @java.lang.Override public open override /*2*/ fun contains(/*0*/ element: E!): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun containsAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun forEach(/*0*/ p0: java.util.function.Consumer!): kotlin.Unit - public abstract override /*1*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): @org.jetbrains.annotations.NotNull E + public abstract override /*1*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): @org.jetbrains.annotations.NotNull E & Any public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int - public abstract override /*1*/ /*fake_override*/ fun indexOf(/*0*/ element: @org.jetbrains.annotations.NotNull E): kotlin.Int + public abstract override /*1*/ /*fake_override*/ fun indexOf(/*0*/ element: @org.jetbrains.annotations.NotNull E & Any): kotlin.Int public open override /*2*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean - public abstract override /*2*/ /*fake_override*/ fun iterator(): kotlin.collections.MutableIterator - public abstract override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ element: @org.jetbrains.annotations.NotNull E): kotlin.Int - public abstract override /*1*/ /*fake_override*/ fun listIterator(): kotlin.collections.MutableListIterator<@org.jetbrains.annotations.NotNull E> - public abstract override /*1*/ /*fake_override*/ fun listIterator(/*0*/ index: kotlin.Int): kotlin.collections.MutableListIterator<@org.jetbrains.annotations.NotNull E> - public open override /*2*/ /*fake_override*/ fun parallelStream(): java.util.stream.Stream + public abstract override /*2*/ /*fake_override*/ fun iterator(): kotlin.collections.MutableIterator + public abstract override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ element: @org.jetbrains.annotations.NotNull E & Any): kotlin.Int + public abstract override /*1*/ /*fake_override*/ fun listIterator(): kotlin.collections.MutableListIterator<@org.jetbrains.annotations.NotNull E & Any> + public abstract override /*1*/ /*fake_override*/ fun listIterator(/*0*/ index: kotlin.Int): kotlin.collections.MutableListIterator<@org.jetbrains.annotations.NotNull E & Any> + public open override /*2*/ /*fake_override*/ fun parallelStream(): java.util.stream.Stream public open override /*2*/ /*fake_override*/ fun remove(/*0*/ element: E!): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun removeAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean - public abstract override /*1*/ /*fake_override*/ fun removeAt(/*0*/ index: kotlin.Int): @org.jetbrains.annotations.NotNull E - public open override /*2*/ /*fake_override*/ fun removeIf(/*0*/ p0: java.util.function.Predicate): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun replaceAll(/*0*/ p0: java.util.function.UnaryOperator<@org.jetbrains.annotations.NotNull E>): kotlin.Unit + public abstract override /*1*/ /*fake_override*/ fun removeAt(/*0*/ index: kotlin.Int): @org.jetbrains.annotations.NotNull E & Any + public open override /*2*/ /*fake_override*/ fun removeIf(/*0*/ p0: java.util.function.Predicate): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun replaceAll(/*0*/ p0: java.util.function.UnaryOperator<@org.jetbrains.annotations.NotNull E & Any>): kotlin.Unit public open override /*2*/ /*fake_override*/ fun retainAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean - public abstract override /*1*/ /*fake_override*/ fun set(/*0*/ index: kotlin.Int, /*1*/ element: @org.jetbrains.annotations.NotNull E): @org.jetbrains.annotations.NotNull E - public open override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun sort(/*0*/ p0: java.util.Comparator!): kotlin.Unit + public abstract override /*1*/ /*fake_override*/ fun set(/*0*/ index: kotlin.Int, /*1*/ element: @org.jetbrains.annotations.NotNull E & Any): @org.jetbrains.annotations.NotNull E & Any + public open override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun sort(/*0*/ p0: java.util.Comparator!): kotlin.Unit public open override /*2*/ /*fake_override*/ fun spliterator(): java.util.Spliterator - public open override /*2*/ /*fake_override*/ fun stream(): java.util.stream.Stream - public abstract override /*1*/ /*fake_override*/ fun subList(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.collections.MutableList<@org.jetbrains.annotations.NotNull E> + public open override /*2*/ /*fake_override*/ fun stream(): java.util.stream.Stream + public abstract override /*1*/ /*fake_override*/ fun subList(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.collections.MutableList<@org.jetbrains.annotations.NotNull E & Any> public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ p0: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/methodWithTypeParameter.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/methodWithTypeParameter.txt index 0215f1d2f65..9241ed45906 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/methodWithTypeParameter.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/methodWithTypeParameter.txt @@ -17,18 +17,18 @@ public/*package*/ open class Outer { public/*package*/ open inner class B : Outer.A { public/*package*/ constructor B() - @java.lang.Override @org.checkerframework.checker.nullness.qual.Nullable public/*package*/ open override /*1*/ fun bar(/*0*/ @org.checkerframework.checker.nullness.qual.NonNull x: @org.checkerframework.checker.nullness.qual.NonNull Y<@org.checkerframework.checker.nullness.qual.NonNull R>): @org.checkerframework.checker.nullness.qual.Nullable X<@org.checkerframework.checker.nullness.qual.Nullable R!>? + @java.lang.Override @org.checkerframework.checker.nullness.qual.Nullable public/*package*/ open override /*1*/ fun bar(/*0*/ @org.checkerframework.checker.nullness.qual.NonNull x: @org.checkerframework.checker.nullness.qual.NonNull Y<@org.checkerframework.checker.nullness.qual.NonNull R & Any>): @org.checkerframework.checker.nullness.qual.Nullable X<@org.checkerframework.checker.nullness.qual.Nullable R!>? public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - @java.lang.Override @org.checkerframework.checker.nullness.qual.NonNull public/*package*/ open override /*1*/ fun foo(/*0*/ @org.checkerframework.checker.nullness.qual.Nullable x: @org.checkerframework.checker.nullness.qual.Nullable T1?): @org.checkerframework.checker.nullness.qual.NonNull T2 + @java.lang.Override @org.checkerframework.checker.nullness.qual.NonNull public/*package*/ open override /*1*/ fun foo(/*0*/ @org.checkerframework.checker.nullness.qual.Nullable x: @org.checkerframework.checker.nullness.qual.Nullable T1?): @org.checkerframework.checker.nullness.qual.NonNull T2 & Any public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } public/*package*/ open inner class C : Outer.B { public/*package*/ constructor C() - @java.lang.Override public/*package*/ open override /*1*/ fun bar(/*0*/ x: Y): X? + @java.lang.Override public/*package*/ open override /*1*/ fun bar(/*0*/ x: Y): X? public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - @java.lang.Override public/*package*/ open override /*1*/ fun foo(/*0*/ x: I?): J + @java.lang.Override public/*package*/ open override /*1*/ fun foo(/*0*/ x: I?): J & Any public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } @@ -37,7 +37,7 @@ public/*package*/ open class Outer { public/*package*/ constructor D() @java.lang.Override @org.checkerframework.checker.nullness.qual.NonNull public/*package*/ open override /*1*/ fun bar(/*0*/ @org.checkerframework.checker.nullness.qual.Nullable x: @org.checkerframework.checker.nullness.qual.Nullable Y<@org.checkerframework.checker.nullness.qual.Nullable F!>!): @org.checkerframework.checker.nullness.qual.NonNull X<@org.checkerframework.checker.nullness.qual.NonNull F!> public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - @java.lang.Override @org.checkerframework.checker.nullness.qual.NonNull public/*package*/ open override /*1*/ fun foo(/*0*/ @org.checkerframework.checker.nullness.qual.Nullable x: @org.checkerframework.checker.nullness.qual.Nullable U?): @org.checkerframework.checker.nullness.qual.NonNull W + @java.lang.Override @org.checkerframework.checker.nullness.qual.NonNull public/*package*/ open override /*1*/ fun foo(/*0*/ @org.checkerframework.checker.nullness.qual.Nullable x: @org.checkerframework.checker.nullness.qual.Nullable U?): @org.checkerframework.checker.nullness.qual.NonNull W & Any 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/androidSdk.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/androidSdk.txt index 59b35eb326b..2dca12cc8be 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/androidSdk.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/androidSdk.txt @@ -6,7 +6,7 @@ public open class A { public constructor A() @android.annotation.Nullable public final var field: kotlin.String? @android.annotation.NonNull public open fun bar(): kotlin.String - @android.annotation.Nullable public open fun baz(/*0*/ @android.annotation.NonNull x: T): T? + @android.annotation.Nullable public open fun baz(/*0*/ @android.annotation.NonNull x: T & Any): T? public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @android.annotation.Nullable public open fun foo(/*0*/ @android.annotation.NonNull x: kotlin.String, /*1*/ @android.annotation.Nullable y: kotlin.CharSequence?): kotlin.String? public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/android_support.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/android_support.txt index 6096deefeec..9d2b8a04a47 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/android_support.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/android_support.txt @@ -6,7 +6,7 @@ public open class A { public constructor A() @android.support.annotation.Nullable public final var field: kotlin.String? @android.support.annotation.NonNull public open fun bar(): kotlin.String - @android.support.annotation.Nullable public open fun baz(/*0*/ @android.support.annotation.NonNull x: T): T? + @android.support.annotation.Nullable public open fun baz(/*0*/ @android.support.annotation.NonNull x: T & Any): T? public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @android.support.annotation.Nullable public open fun foo(/*0*/ @android.support.annotation.NonNull x: kotlin.String, /*1*/ @android.support.annotation.Nullable y: kotlin.CharSequence?): kotlin.String? public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/androidx.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/androidx.txt index b08dafcbb41..21b6b24ad33 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/androidx.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/androidx.txt @@ -6,7 +6,7 @@ public open class A { public constructor A() @androidx.annotation.Nullable public final var field: kotlin.String? @androidx.annotation.NonNull public open fun bar(): kotlin.String - @androidx.annotation.Nullable public open fun baz(/*0*/ @androidx.annotation.NonNull x: T): T? + @androidx.annotation.Nullable public open fun baz(/*0*/ @androidx.annotation.NonNull x: T & Any): T? public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @androidx.annotation.Nullable public open fun foo(/*0*/ @androidx.annotation.NonNull x: kotlin.String, /*1*/ @androidx.annotation.Nullable y: kotlin.CharSequence?): kotlin.String? public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/aosp.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/aosp.txt index dd00b442627..bdbc6a0ad4e 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/aosp.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/aosp.txt @@ -6,7 +6,7 @@ public open class A { public constructor A() @com.android.annotations.Nullable public final var field: kotlin.String? @com.android.annotations.NonNull public open fun bar(): kotlin.String - @com.android.annotations.Nullable public open fun baz(/*0*/ @com.android.annotations.NonNull x: T): T? + @com.android.annotations.Nullable public open fun baz(/*0*/ @com.android.annotations.NonNull x: T & Any): T? public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @com.android.annotations.Nullable public open fun foo(/*0*/ @com.android.annotations.NonNull x: kotlin.String, /*1*/ @com.android.annotations.Nullable y: kotlin.CharSequence?): kotlin.String? public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/eclipse.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/eclipse.txt index 324327d1e0a..8877cc2a74f 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/eclipse.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/eclipse.txt @@ -6,7 +6,7 @@ public open class A { public constructor A() @org.eclipse.jdt.annotation.Nullable public final var field: kotlin.String? @org.eclipse.jdt.annotation.NonNull public open fun bar(): kotlin.String - @org.eclipse.jdt.annotation.Nullable public open fun baz(/*0*/ @org.eclipse.jdt.annotation.NonNull x: T): T? + @org.eclipse.jdt.annotation.Nullable public open fun baz(/*0*/ @org.eclipse.jdt.annotation.NonNull x: T & Any): T? public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @org.eclipse.jdt.annotation.Nullable public open fun foo(/*0*/ @org.eclipse.jdt.annotation.NonNull x: kotlin.String, /*1*/ @org.eclipse.jdt.annotation.Nullable y: kotlin.CharSequence?): kotlin.String? public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/multiple.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/multiple.txt index 49b6c96e2ad..262dce18ce4 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/multiple.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/multiple.txt @@ -9,7 +9,7 @@ public open class A1 { public constructor A1() @io.reactivex.annotations.Nullable public final var field: kotlin.String? @io.reactivex.annotations.NonNull public open fun bar(): kotlin.String - @io.reactivex.annotations.Nullable public open fun baz(/*0*/ @io.reactivex.annotations.NonNull x: T): T? + @io.reactivex.annotations.Nullable public open fun baz(/*0*/ @io.reactivex.annotations.NonNull x: T & Any): T? public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @io.reactivex.annotations.Nullable public open fun foo(/*0*/ @io.reactivex.annotations.NonNull x: kotlin.String, /*1*/ @io.reactivex.annotations.Nullable y: kotlin.CharSequence?): kotlin.String? public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -31,7 +31,7 @@ public open class A3 { public constructor A3() @androidx.annotation.Nullable public final var field: kotlin.String? @androidx.annotation.NonNull public open fun bar(): kotlin.String - @androidx.annotation.Nullable public open fun baz(/*0*/ @androidx.annotation.NonNull x: T): T? + @androidx.annotation.Nullable public open fun baz(/*0*/ @androidx.annotation.NonNull x: T & Any): T? public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @androidx.annotation.Nullable public open fun foo(/*0*/ @androidx.annotation.NonNull x: kotlin.String, /*1*/ @androidx.annotation.Nullable y: kotlin.CharSequence?): kotlin.String? public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/rxjava.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/rxjava.txt index 2858461cae3..27dcc3250ed 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/rxjava.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/rxjava.txt @@ -6,7 +6,7 @@ public open class A { public constructor A() @io.reactivex.annotations.Nullable public final var field: kotlin.String? @io.reactivex.annotations.NonNull public open fun bar(): kotlin.String - @io.reactivex.annotations.Nullable public open fun baz(/*0*/ @io.reactivex.annotations.NonNull x: T): T? + @io.reactivex.annotations.Nullable public open fun baz(/*0*/ @io.reactivex.annotations.NonNull x: T & Any): T? public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @io.reactivex.annotations.Nullable public open fun foo(/*0*/ @io.reactivex.annotations.NonNull x: kotlin.String, /*1*/ @io.reactivex.annotations.Nullable y: kotlin.CharSequence?): kotlin.String? public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/rxjava3Errors.txt b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/rxjava3Errors.txt index a75787a32bc..8df7d93e2ef 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/tests/rxjava3Errors.txt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/tests/rxjava3Errors.txt @@ -6,7 +6,7 @@ public open class A { public constructor A() @io.reactivex.rxjava3.annotations.Nullable public final var field: @io.reactivex.rxjava3.annotations.Nullable kotlin.String? @io.reactivex.rxjava3.annotations.NonNull public open fun bar(): @io.reactivex.rxjava3.annotations.NonNull kotlin.String - @io.reactivex.rxjava3.annotations.Nullable public open fun baz(/*0*/ @io.reactivex.rxjava3.annotations.NonNull x: @io.reactivex.rxjava3.annotations.NonNull T): @io.reactivex.rxjava3.annotations.Nullable T? + @io.reactivex.rxjava3.annotations.Nullable public open fun baz(/*0*/ @io.reactivex.rxjava3.annotations.NonNull x: @io.reactivex.rxjava3.annotations.NonNull T & Any): @io.reactivex.rxjava3.annotations.Nullable T? public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @io.reactivex.rxjava3.annotations.Nullable public open fun foo(/*0*/ @io.reactivex.rxjava3.annotations.NonNull x: @io.reactivex.rxjava3.annotations.NonNull kotlin.String, /*1*/ @io.reactivex.rxjava3.annotations.Nullable y: @io.reactivex.rxjava3.annotations.Nullable kotlin.CharSequence?): @io.reactivex.rxjava3.annotations.Nullable kotlin.String? public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/ValAndFunOverrideCompatibilityClash.txt b/compiler/testData/diagnostics/tests/ValAndFunOverrideCompatibilityClash.txt index 9c842f43657..5c30f7f4ad2 100644 --- a/compiler/testData/diagnostics/tests/ValAndFunOverrideCompatibilityClash.txt +++ b/compiler/testData/diagnostics/tests/ValAndFunOverrideCompatibilityClash.txt @@ -31,8 +31,8 @@ public final class Foo1 : java.util.ArrayList { invisible_fake open override /*1*/ /*fake_override*/ fun batchRemove(/*0*/ c: kotlin.collections.(Mutable)Collection<*>!, /*1*/ complement: kotlin.Boolean): 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 contains(/*0*/ element: kotlin.Int): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun containsAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun contains(/*0*/ element: kotlin.Int!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun containsAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean invisible_fake open override /*1*/ /*fake_override*/ fun elementData(/*0*/ index: kotlin.Int): kotlin.Int! public open override /*1*/ /*fake_override*/ fun ensureCapacity(/*0*/ minCapacity: kotlin.Int): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun ensureCapacityInternal(/*0*/ minCapacity: kotlin.Int): kotlin.Unit @@ -42,21 +42,21 @@ public final class Foo1 : java.util.ArrayList { public open override /*1*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): kotlin.Int invisible_fake open override /*1*/ /*fake_override*/ fun grow(/*0*/ minCapacity: kotlin.Int): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ element: kotlin.Int): kotlin.Int + public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ element: kotlin.Int!): kotlin.Int public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.collections.MutableIterator - public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ element: kotlin.Int): kotlin.Int + public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ element: kotlin.Int!): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.collections.MutableListIterator public open override /*1*/ /*fake_override*/ fun listIterator(/*0*/ index: kotlin.Int): kotlin.collections.MutableListIterator invisible_fake open override /*1*/ /*fake_override*/ fun outOfBoundsMsg(/*0*/ index: kotlin.Int): kotlin.String! invisible_fake open override /*1*/ /*fake_override*/ fun rangeCheck(/*0*/ index: kotlin.Int): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun rangeCheckForAdd(/*0*/ index: kotlin.Int): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun readObject(/*0*/ s: java.io.ObjectInputStream!): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun remove(/*0*/ element: kotlin.Int): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun removeAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun remove(/*0*/ element: kotlin.Int!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun removeAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun removeAt(/*0*/ index: kotlin.Int): kotlin.Int protected/*protected and package*/ open override /*1*/ /*fake_override*/ fun removeRange(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun retainAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun retainAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun set(/*0*/ index: kotlin.Int, /*1*/ element: kotlin.Int): kotlin.Int public open override /*1*/ /*fake_override*/ fun subList(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.collections.MutableList public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! diff --git a/compiler/testData/diagnostics/tests/checkArguments/kt49276.kt b/compiler/testData/diagnostics/tests/checkArguments/kt49276.kt index 7df678d70bf..5ff36331970 100644 --- a/compiler/testData/diagnostics/tests/checkArguments/kt49276.kt +++ b/compiler/testData/diagnostics/tests/checkArguments/kt49276.kt @@ -22,10 +22,10 @@ fun takes(range: T) {} fun takes(range: T) where T : Collection<*>, T: ClosedRange<*> {} fun main() { - SmartList( SmartList(x: Collection): Unit")!>1..2) // warning + SmartList(1..2) // warning SmartList(1..10) // no warning - append(): Unit")!>1..10) // warning + append(1..10) // warning append((1..10) as Any) // no warning append((1..10) as Iterable) // no warning append("a".."z") // no warning, the range is not iterable @@ -35,9 +35,9 @@ fun main() { append3(In(1..10)) // no warning - append4(> append4(x: E): Unit")!>1..10) // warning + append4(1..10) // warning append4(1..10) // warning - takes(> takes(range: T): Unit where T : ClosedRange<*>")!>1..10) // warning + takes(1..10) // warning } diff --git a/compiler/testData/diagnostics/tests/checkArguments/kt51062.kt b/compiler/testData/diagnostics/tests/checkArguments/kt51062.kt index aa51cc3dad8..2d89973bfc2 100644 --- a/compiler/testData/diagnostics/tests/checkArguments/kt51062.kt +++ b/compiler/testData/diagnostics/tests/checkArguments/kt51062.kt @@ -32,10 +32,10 @@ public class JavaSmartList { // FILE: main.kt fun main() { - JavaSmartList((x: (Mutable)Collection!)")!>1..2) // warning + JavaSmartList(1..2) // warning JavaSmartList(1..10) // no warning - JavaSmartList.append(!): Unit")!>1..10) // warning + JavaSmartList.append(1..10) // warning JavaSmartList.append((1..10) as Any) // no warning JavaSmartList.append((1..10) as Iterable) // no warning JavaSmartList.append("a".."z") // no warning, the range is not iterable @@ -45,9 +45,9 @@ fun main() { JavaSmartList.append3(JavaSmartList.In(1..10)) // no warning - JavaSmartList.append4(!> append4(x: E!): Unit")!>1..10) // warning + JavaSmartList.append4(1..10) // warning JavaSmartList.append4(1..10) // warning - JavaSmartList.takes(!> takes(x: T!): Unit where T : ClosedRange<*>!")!>1..10) // warning + JavaSmartList.takes(1..10) // warning } 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/constantEvaluator/constant/duplicateLabelWithNonTrivialCondition_disabled.fir.kt b/compiler/testData/diagnostics/tests/constantEvaluator/constant/duplicateLabelWithNonTrivialCondition_disabled.fir.kt index 0f484062dad..8d19c586abc 100644 --- a/compiler/testData/diagnostics/tests/constantEvaluator/constant/duplicateLabelWithNonTrivialCondition_disabled.fir.kt +++ b/compiler/testData/diagnostics/tests/constantEvaluator/constant/duplicateLabelWithNonTrivialCondition_disabled.fir.kt @@ -5,8 +5,8 @@ const val myT = true fun test(someBoolean: Boolean) { val s = when (someBoolean) { - true || true -> 1 - false && false -> 2 + true || true -> 1 + false && false -> 2 true -> 3 false -> 4 } @@ -14,7 +14,7 @@ fun test(someBoolean: Boolean) { fun test_2(someBoolean: Boolean) { val s = when (someBoolean) { - true || true -> 1 - false && false -> 2 + true || true -> 1 + false && false -> 2 } } diff --git a/compiler/testData/diagnostics/tests/constantEvaluator/constant/duplicateLabelWithNonTrivialCondition_disabled.kt b/compiler/testData/diagnostics/tests/constantEvaluator/constant/duplicateLabelWithNonTrivialCondition_disabled.kt index a5596b9ccb8..d039616a730 100644 --- a/compiler/testData/diagnostics/tests/constantEvaluator/constant/duplicateLabelWithNonTrivialCondition_disabled.kt +++ b/compiler/testData/diagnostics/tests/constantEvaluator/constant/duplicateLabelWithNonTrivialCondition_disabled.kt @@ -5,8 +5,8 @@ const val myT = true fun test(someBoolean: Boolean) { val s = when (someBoolean) { - true || true -> 1 - false && false -> 2 + true || true -> 1 + false && false -> 2 true -> 3 false -> 4 } @@ -14,7 +14,7 @@ fun test(someBoolean: Boolean) { fun test_2(someBoolean: Boolean) { val s = when (someBoolean) { - true || true -> 1 - false && false -> 2 + true || true -> 1 + false && false -> 2 } } diff --git a/compiler/testData/diagnostics/tests/constantEvaluator/constant/duplicateLabelWithNonTrivialCondition_enabled.kt b/compiler/testData/diagnostics/tests/constantEvaluator/constant/duplicateLabelWithNonTrivialCondition_enabled.kt index a31882a9592..9a02cff7585 100644 --- a/compiler/testData/diagnostics/tests/constantEvaluator/constant/duplicateLabelWithNonTrivialCondition_enabled.kt +++ b/compiler/testData/diagnostics/tests/constantEvaluator/constant/duplicateLabelWithNonTrivialCondition_enabled.kt @@ -6,8 +6,8 @@ const val myT = true fun test(someBoolean: Boolean) { val s = when (someBoolean) { - true || true -> 1 - false && false -> 2 + true || true -> 1 + false && false -> 2 true -> 3 false -> 4 } @@ -15,7 +15,7 @@ fun test(someBoolean: Boolean) { fun test_2(someBoolean: Boolean) { val s = when (someBoolean) { - true || true -> 1 - false && false -> 2 + true || true -> 1 + false && false -> 2 } } diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedEnumCompanionVals.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedEnumCompanionVals.kt index 86fea59ebe5..8a73c99b1b9 100644 --- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedEnumCompanionVals.kt +++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedEnumCompanionVals.kt @@ -1,7 +1,7 @@ // SKIP_TXT enum class A(val z: Any) { - Y(x); + Y(x); companion object { val x = A.Y.ordinal @@ -9,7 +9,7 @@ enum class A(val z: Any) { } enum class B(val z: Any) { - Y(B.x); + Y(B.x); companion object { val x = B.Y.ordinal diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/enumCompanionInterdependence.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/enumCompanionInterdependence.kt index 1838987b064..165a9a65c4c 100644 --- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/enumCompanionInterdependence.kt +++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/enumCompanionInterdependence.kt @@ -9,7 +9,7 @@ enum class B(val x: Int) { } enum class C(val x: Int) { - C1(SUM), + C1(SUM), C2(1); companion object { @@ -32,8 +32,8 @@ enum class Fruit(personal: Int) { // Another example from KT-11769 enum class EnumCompanion1(val x: Int) { - INSTANCE(Companion.foo()), - ANOTHER(foo()); + INSTANCE(Companion.foo()), + ANOTHER(foo()); companion object { fun foo() = 42 @@ -41,7 +41,7 @@ enum class EnumCompanion1(val x: Int) { } // Also should be reported for implicit receiver enum class EnumCompanion2(val x: Int) { - INSTANCE(foo()); + INSTANCE(foo()); companion object { fun foo() = 42 diff --git a/compiler/testData/diagnostics/tests/controlStructures/ifWhenWithoutElse.kt b/compiler/testData/diagnostics/tests/controlStructures/ifWhenWithoutElse.kt index 2a4bee30751..ae1dd0c34e5 100644 --- a/compiler/testData/diagnostics/tests/controlStructures/ifWhenWithoutElse.kt +++ b/compiler/testData/diagnostics/tests/controlStructures/ifWhenWithoutElse.kt @@ -56,8 +56,8 @@ fun g6(): Unit = when { true -> 42 } fun foo1(x: String?) { "" + if (true) 42 w@while (true) { - x ?: if (true) break - x ?: when { true -> break@w } + x ?: if (true) break + x ?: when { true -> break@w } } } diff --git a/compiler/testData/diagnostics/tests/functionLiterals/kt11733_1.txt b/compiler/testData/diagnostics/tests/functionLiterals/kt11733_1.txt index e80958b0045..1f20f2cbe5c 100644 --- a/compiler/testData/diagnostics/tests/functionLiterals/kt11733_1.txt +++ b/compiler/testData/diagnostics/tests/functionLiterals/kt11733_1.txt @@ -6,7 +6,7 @@ public fun process(/*0*/ x: Predicate): kotlin.Unit public interface Predicate { 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 abstract operator fun invoke(/*0*/ @org.jetbrains.annotations.NotNull t: T): kotlin.Boolean + public abstract operator fun invoke(/*0*/ @org.jetbrains.annotations.NotNull t: T & Any): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } diff --git a/compiler/testData/diagnostics/tests/inference/capturedTypes/kt46727.txt b/compiler/testData/diagnostics/tests/inference/capturedTypes/kt46727.txt index ae01fe093f1..b29e1fca3f4 100644 --- a/compiler/testData/diagnostics/tests/inference/capturedTypes/kt46727.txt +++ b/compiler/testData/diagnostics/tests/inference/capturedTypes/kt46727.txt @@ -55,7 +55,7 @@ public open class Foo2 { public open class Foo3 { public constructor Foo3() - @org.jetbrains.annotations.NotNull public final var value: T + @org.jetbrains.annotations.NotNull public final var value: T & Any 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/tests/inference/capturedTypes/kt46727Warnings.txt b/compiler/testData/diagnostics/tests/inference/capturedTypes/kt46727Warnings.txt index ae01fe093f1..b29e1fca3f4 100644 --- a/compiler/testData/diagnostics/tests/inference/capturedTypes/kt46727Warnings.txt +++ b/compiler/testData/diagnostics/tests/inference/capturedTypes/kt46727Warnings.txt @@ -55,7 +55,7 @@ public open class Foo2 { public open class Foo3 { public constructor Foo3() - @org.jetbrains.annotations.NotNull public final var value: T + @org.jetbrains.annotations.NotNull public final var value: T & Any 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/tests/inference/kt49658.kt b/compiler/testData/diagnostics/tests/inference/kt49658.kt index 902ae5fd36f..f41d607ff38 100644 --- a/compiler/testData/diagnostics/tests/inference/kt49658.kt +++ b/compiler/testData/diagnostics/tests/inference/kt49658.kt @@ -1,16 +1,16 @@ // WITH_STDLIB fun doTheMapThing1(elements: List): List { - return elements.flatMap { - when (it) { // NullPointerException + return elements.flatMap { + when (it) { // NullPointerException is String -> listOf("Yeah") else -> null } - } + } } fun doTheMapThing2(elements: List): List { - return elements.flatMap { - if (it is String) listOf("Yeah") else null // it's OK with `if` - } + return elements.flatMap { + if (it is String) listOf("Yeah") else null // it's OK with `if` + } } diff --git a/compiler/testData/diagnostics/tests/j+k/GenericsInSupertypes.txt b/compiler/testData/diagnostics/tests/j+k/GenericsInSupertypes.txt index 1f7ad333b54..6b8f8f75cbe 100644 --- a/compiler/testData/diagnostics/tests/j+k/GenericsInSupertypes.txt +++ b/compiler/testData/diagnostics/tests/j+k/GenericsInSupertypes.txt @@ -13,8 +13,8 @@ public abstract class AL : java.util.ArrayList { invisible_fake open override /*1*/ /*fake_override*/ fun batchRemove(/*0*/ c: kotlin.collections.(Mutable)Collection<*>!, /*1*/ complement: kotlin.Boolean): 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 contains(/*0*/ element: p.P): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun containsAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun contains(/*0*/ element: p.P!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun containsAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean invisible_fake open override /*1*/ /*fake_override*/ fun elementData(/*0*/ index: kotlin.Int): p.P! public open override /*1*/ /*fake_override*/ fun ensureCapacity(/*0*/ minCapacity: kotlin.Int): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun ensureCapacityInternal(/*0*/ minCapacity: kotlin.Int): kotlin.Unit @@ -24,21 +24,21 @@ public abstract class AL : java.util.ArrayList { public open override /*1*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): p.P invisible_fake open override /*1*/ /*fake_override*/ fun grow(/*0*/ minCapacity: kotlin.Int): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ element: p.P): kotlin.Int + public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ element: p.P!): kotlin.Int public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.collections.MutableIterator - public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ element: p.P): kotlin.Int + public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ element: p.P!): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.collections.MutableListIterator public open override /*1*/ /*fake_override*/ fun listIterator(/*0*/ index: kotlin.Int): kotlin.collections.MutableListIterator invisible_fake open override /*1*/ /*fake_override*/ fun outOfBoundsMsg(/*0*/ index: kotlin.Int): kotlin.String! invisible_fake open override /*1*/ /*fake_override*/ fun rangeCheck(/*0*/ index: kotlin.Int): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun rangeCheckForAdd(/*0*/ index: kotlin.Int): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun readObject(/*0*/ s: java.io.ObjectInputStream!): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun remove(/*0*/ element: p.P): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun removeAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun remove(/*0*/ element: p.P!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun removeAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun removeAt(/*0*/ index: kotlin.Int): p.P protected/*protected and package*/ open override /*1*/ /*fake_override*/ fun removeRange(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun retainAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun retainAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun set(/*0*/ index: kotlin.Int, /*1*/ element: p.P): p.P public open override /*1*/ /*fake_override*/ fun subList(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.collections.MutableList public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! 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 97cb19078c5..47968aa2c18 100644 --- a/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-SpecialTypes.txt +++ b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-SpecialTypes.txt @@ -11,9 +11,9 @@ public open class A { public open class X { public constructor X() - public/*package*/ open fun barN(/*0*/ @org.jetbrains.annotations.NotNull a: T): kotlin.Unit + public/*package*/ open fun barN(/*0*/ @org.jetbrains.annotations.NotNull a: T & Any): kotlin.Unit public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - @org.jetbrains.annotations.NotNull public/*package*/ open fun fooN(): T + @org.jetbrains.annotations.NotNull public/*package*/ open fun fooN(): T & Any 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 9cfb4bb45b8..e6876d24fcc 100644 --- a/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-UserTypes.txt +++ b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-UserTypes.txt @@ -11,9 +11,9 @@ public open class A { public open class X { public constructor X() - public/*package*/ open fun barN(/*0*/ @org.jetbrains.annotations.NotNull a: T): kotlin.Unit + public/*package*/ open fun barN(/*0*/ @org.jetbrains.annotations.NotNull a: T & Any): kotlin.Unit public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - @org.jetbrains.annotations.NotNull public/*package*/ open fun fooN(): T + @org.jetbrains.annotations.NotNull public/*package*/ open fun fooN(): T & Any 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 003b0799fdf..69dd2c39cbe 100644 --- a/compiler/testData/diagnostics/tests/j+k/integerNotNullable.txt +++ b/compiler/testData/diagnostics/tests/j+k/integerNotNullable.txt @@ -6,7 +6,7 @@ public open class Box { public constructor Box() 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 put(/*0*/ @org.jetbrains.annotations.NotNull t: T): kotlin.Unit + public open fun put(/*0*/ @org.jetbrains.annotations.NotNull t: T & Any): kotlin.Unit public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } diff --git a/compiler/testData/diagnostics/tests/j+k/specialBridges.txt b/compiler/testData/diagnostics/tests/j+k/specialBridges.txt index c166133e341..aa12f176ec2 100644 --- a/compiler/testData/diagnostics/tests/j+k/specialBridges.txt +++ b/compiler/testData/diagnostics/tests/j+k/specialBridges.txt @@ -13,8 +13,8 @@ public final class B2 : java.util.ArrayList, I2 { invisible_fake open override /*1*/ /*fake_override*/ fun batchRemove(/*0*/ c: kotlin.collections.(Mutable)Collection<*>!, /*1*/ complement: kotlin.Boolean): 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 contains(/*0*/ element: kotlin.String): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun containsAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun contains(/*0*/ element: kotlin.String!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun containsAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean invisible_fake open override /*1*/ /*fake_override*/ fun elementData(/*0*/ index: kotlin.Int): kotlin.String! public open override /*1*/ /*fake_override*/ fun ensureCapacity(/*0*/ minCapacity: kotlin.Int): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun ensureCapacityInternal(/*0*/ minCapacity: kotlin.Int): kotlin.Unit @@ -24,21 +24,21 @@ public final class B2 : java.util.ArrayList, I2 { public open override /*1*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): kotlin.String invisible_fake open override /*1*/ /*fake_override*/ fun grow(/*0*/ minCapacity: kotlin.Int): kotlin.Unit public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ element: kotlin.String): kotlin.Int + public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ element: kotlin.String!): kotlin.Int public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.collections.MutableIterator - public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ element: kotlin.String): kotlin.Int + public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ element: kotlin.String!): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.collections.MutableListIterator public open override /*1*/ /*fake_override*/ fun listIterator(/*0*/ index: kotlin.Int): kotlin.collections.MutableListIterator invisible_fake open override /*1*/ /*fake_override*/ fun outOfBoundsMsg(/*0*/ index: kotlin.Int): kotlin.String! invisible_fake open override /*1*/ /*fake_override*/ fun rangeCheck(/*0*/ index: kotlin.Int): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun rangeCheckForAdd(/*0*/ index: kotlin.Int): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun readObject(/*0*/ s: java.io.ObjectInputStream!): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun remove(/*0*/ element: kotlin.String): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun removeAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun remove(/*0*/ element: kotlin.String!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun removeAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun removeAt(/*0*/ index: kotlin.Int): kotlin.String protected/*protected and package*/ open override /*1*/ /*fake_override*/ fun removeRange(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun retainAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun retainAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun set(/*0*/ index: kotlin.Int, /*1*/ element: kotlin.String): kotlin.String public open override /*1*/ /*fake_override*/ fun subList(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.collections.MutableList public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! diff --git a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/notnullTypesFromJavaWithSmartcast.txt b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/notnullTypesFromJavaWithSmartcast.txt index 1fbff88cadc..e6d3367d07d 100644 --- a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/notnullTypesFromJavaWithSmartcast.txt +++ b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/notnullTypesFromJavaWithSmartcast.txt @@ -9,6 +9,6 @@ public open class JClass { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String // Static members - @org.jetbrains.annotations.NotNull public open fun getNotNullT(): T + @org.jetbrains.annotations.NotNull public open fun getNotNullT(): T & Any } diff --git a/compiler/testData/diagnostics/tests/operatorsOverloading/until/customDefault.fir.kt b/compiler/testData/diagnostics/tests/operatorsOverloading/until/customDefault.fir.kt deleted file mode 100644 index f3c79b76768..00000000000 --- a/compiler/testData/diagnostics/tests/operatorsOverloading/until/customDefault.fir.kt +++ /dev/null @@ -1,9 +0,0 @@ -class A { - operator fun rangeUntil(other: A): Iterable = TODO() -} - -fun main(n: A, f: A) { - for (i in f..operator fun rangeUntil(other: A): Iterable = TODO() + operator fun rangeUntil(other: A): Iterable = TODO() } fun main(n: A, f: A) { - for (i in f..<n) { + for (i in f..operator fun rangeUntil(other: A): Iterable = TODO() + operator fun rangeUntil(other: A): Iterable = TODO() } fun main(n: A, f: A) { - for (i in f..<n) { + for (i in f..<n) { } } diff --git a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/enhancementFromAnnotation.txt b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/enhancementFromAnnotation.txt index bb881f00323..1030620c02e 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/enhancementFromAnnotation.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/enhancementFromAnnotation.txt @@ -4,7 +4,7 @@ public fun test(): kotlin.Unit public interface A { public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public abstract fun foo(/*0*/ @org.jetbrains.annotations.NotNull x: T): kotlin.Unit + public abstract fun foo(/*0*/ @org.jetbrains.annotations.NotNull x: T & Any): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } @@ -20,7 +20,7 @@ public open class B { public open class C : B, A { public constructor C() public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*2*/ fun foo(/*0*/ x: F): kotlin.Unit + public open override /*2*/ fun foo(/*0*/ x: F & Any): kotlin.Unit public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String diff --git a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/methodTypeParameter.txt b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/methodTypeParameter.txt index 3f4cca30294..fdc6ec1fdcb 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/methodTypeParameter.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/methodTypeParameter.txt @@ -9,7 +9,7 @@ public open class A { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String // Static members - public open fun bar(/*0*/ @org.jetbrains.annotations.NotNull x: T, /*1*/ y: T!): kotlin.Unit + public open fun bar(/*0*/ @org.jetbrains.annotations.NotNull x: T & Any, /*1*/ y: T!): kotlin.Unit public open fun platformString(): kotlin.String! } diff --git a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceReturnType.txt b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceReturnType.txt index 64edc3f5ee9..93881a16608 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceReturnType.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceReturnType.txt @@ -4,7 +4,7 @@ public fun test(): kotlin.Unit public open class A { public constructor A() - @org.jetbrains.annotations.NotNull public open fun bar(): T + @org.jetbrains.annotations.NotNull public open fun bar(): T & Any 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/tests/platformTypes/notNullTypeParameter/noInheritanceValueParameter.txt b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceValueParameter.txt index bd3338f8537..d098bf88355 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceValueParameter.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceValueParameter.txt @@ -4,7 +4,7 @@ public fun test(): kotlin.Unit public open class A { public constructor A() - public open fun bar(/*0*/ @org.jetbrains.annotations.NotNull x: T): kotlin.Unit + public open fun bar(/*0*/ @org.jetbrains.annotations.NotNull x: T & Any): kotlin.Unit 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/tests/platformTypes/notNullTypeParameter/onTypeProjection.txt b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/onTypeProjection.txt index 67869d53f25..c81a35c7a67 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/onTypeProjection.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/onTypeProjection.txt @@ -4,7 +4,7 @@ public fun test(/*0*/ a: A): kotlin.Unit public open class A { public constructor A() - @org.jetbrains.annotations.NotNull public open fun bar(): T + @org.jetbrains.annotations.NotNull public open fun bar(): T & Any 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/tests/platformTypes/notNullTypeParameter/substitutionInSuperType.txt b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/substitutionInSuperType.txt index 563b922256e..6ee176d66d8 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/substitutionInSuperType.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/substitutionInSuperType.txt @@ -4,7 +4,7 @@ public fun test(): kotlin.Unit public open class A { public constructor A() - public open fun bar(/*0*/ @org.jetbrains.annotations.NotNull x: T): kotlin.Unit + public open fun bar(/*0*/ @org.jetbrains.annotations.NotNull x: T & Any): kotlin.Unit 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/tests/platformTypes/nullabilityWarnings/elvis.txt b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/elvis.txt index 93dcb4a4670..05e3587c7cc 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/elvis.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/elvis.txt @@ -15,6 +15,6 @@ public open class J { @org.jetbrains.annotations.NotNull public final var staticNN: J public open fun getAny(): T! @org.jetbrains.annotations.Nullable public open fun getNAny(): T? - @org.jetbrains.annotations.NotNull public open fun getNNAny(): T + @org.jetbrains.annotations.NotNull public open fun getNNAny(): T & Any } diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/typeEnhancement.txt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/typeEnhancement.txt index 4b45fcf5a01..2e94f101164 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/typeEnhancement.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/typeEnhancement.txt @@ -6,7 +6,7 @@ public fun main(): kotlin.Unit public/*package*/ open class A { public/*package*/ constructor A() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - @org.jetbrains.annotations.NotNull public/*package*/ open fun foo(/*0*/ @org.jetbrains.annotations.NotNull x: T, /*1*/ @org.jetbrains.annotations.Nullable y: kotlin.collections.(Mutable)List?): kotlin.collections.(Mutable)List + @org.jetbrains.annotations.NotNull public/*package*/ open fun foo(/*0*/ @org.jetbrains.annotations.NotNull x: T & Any, /*1*/ @org.jetbrains.annotations.Nullable y: kotlin.collections.(Mutable)List?): kotlin.collections.(Mutable)List 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/supertypeTypeArguments.txt b/compiler/testData/diagnostics/tests/platformTypes/supertypeTypeArguments.txt index 04952898f8c..2dcf7cea725 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/supertypeTypeArguments.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/supertypeTypeArguments.txt @@ -33,13 +33,13 @@ public final class HashMapEx : java.util.HashMap, ExtMap invisible_fake open override /*1*/ /*fake_override*/ fun capacity(): kotlin.Int public open override /*1*/ /*fake_override*/ fun clear(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun clone(): kotlin.Any - public open override /*2*/ /*fake_override*/ fun containsKey(/*0*/ key: K): kotlin.Boolean + public open override /*2*/ /*fake_override*/ fun containsKey(/*0*/ key: K!): kotlin.Boolean invisible_fake open override /*1*/ /*fake_override*/ fun containsNullValue(): kotlin.Boolean - public open override /*2*/ /*fake_override*/ fun containsValue(/*0*/ value: V): kotlin.Boolean + public open override /*2*/ /*fake_override*/ fun containsValue(/*0*/ value: V!): kotlin.Boolean invisible_fake open override /*1*/ /*fake_override*/ fun createEntry(/*0*/ hash: kotlin.Int, /*1*/ key: K!, /*2*/ value: V!, /*3*/ bucketIndex: kotlin.Int): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun entrySet0(): kotlin.collections.(Mutable)Set!>! public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*2*/ /*fake_override*/ fun get(/*0*/ key: K): V? + public open override /*2*/ /*fake_override*/ fun get(/*0*/ key: K!): V? invisible_fake final override /*1*/ /*fake_override*/ fun getEntry(/*0*/ key: kotlin.Any!): java.util.HashMap.Entry! invisible_fake open override /*1*/ /*fake_override*/ fun getForNullKey(): V! invisible_fake final override /*1*/ /*fake_override*/ fun hash(/*0*/ k: kotlin.Any!): kotlin.Int @@ -58,7 +58,7 @@ public final class HashMapEx : java.util.HashMap, ExtMap invisible_fake open override /*1*/ /*fake_override*/ fun putForCreate(/*0*/ key: K!, /*1*/ value: V!): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun putForNullKey(/*0*/ value: V!): V! invisible_fake open override /*1*/ /*fake_override*/ fun readObject(/*0*/ s: java.io.ObjectInputStream!): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: K): V? + public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: K!): V? invisible_fake final override /*1*/ /*fake_override*/ fun removeEntryForKey(/*0*/ key: kotlin.Any!): java.util.HashMap.Entry! invisible_fake final override /*1*/ /*fake_override*/ fun removeMapping(/*0*/ o: kotlin.Any!): java.util.HashMap.Entry! invisible_fake open override /*1*/ /*fake_override*/ fun resize(/*0*/ newCapacity: kotlin.Int): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/saveAnnotationAfterSubstitution.txt b/compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/saveAnnotationAfterSubstitution.txt index dd20ff26b56..8b8b52a4964 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/saveAnnotationAfterSubstitution.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/saveAnnotationAfterSubstitution.txt @@ -2,7 +2,7 @@ package public interface A { public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public abstract fun foo(/*0*/ @org.jetbrains.annotations.NotNull x: T, /*1*/ @org.jetbrains.annotations.Nullable y: T?): kotlin.Unit + public abstract fun foo(/*0*/ @org.jetbrains.annotations.NotNull x: T & Any, /*1*/ @org.jetbrains.annotations.Nullable y: T?): kotlin.Unit 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/scopes/visibility2.txt b/compiler/testData/diagnostics/tests/scopes/visibility2.txt index 4395fa42cef..0479169557d 100644 --- a/compiler/testData/diagnostics/tests/scopes/visibility2.txt +++ b/compiler/testData/diagnostics/tests/scopes/visibility2.txt @@ -44,8 +44,8 @@ package b { invisible_fake open override /*1*/ /*fake_override*/ fun batchRemove(/*0*/ c: kotlin.collections.(Mutable)Collection<*>!, /*1*/ complement: kotlin.Boolean): 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 contains(/*0*/ element: java.lang.Integer): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun containsAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun contains(/*0*/ element: java.lang.Integer!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun containsAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean invisible_fake open override /*1*/ /*fake_override*/ fun elementData(/*0*/ index: kotlin.Int): java.lang.Integer! public open override /*1*/ /*fake_override*/ fun ensureCapacity(/*0*/ minCapacity: kotlin.Int): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun ensureCapacityInternal(/*0*/ minCapacity: kotlin.Int): kotlin.Unit @@ -55,21 +55,21 @@ package b { public open override /*1*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): java.lang.Integer invisible_fake open override /*1*/ /*fake_override*/ fun grow(/*0*/ minCapacity: kotlin.Int): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ element: java.lang.Integer): kotlin.Int + public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ element: java.lang.Integer!): kotlin.Int public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.collections.MutableIterator - public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ element: java.lang.Integer): kotlin.Int + public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ element: java.lang.Integer!): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.collections.MutableListIterator public open override /*1*/ /*fake_override*/ fun listIterator(/*0*/ index: kotlin.Int): kotlin.collections.MutableListIterator invisible_fake open override /*1*/ /*fake_override*/ fun outOfBoundsMsg(/*0*/ index: kotlin.Int): kotlin.String! invisible_fake open override /*1*/ /*fake_override*/ fun rangeCheck(/*0*/ index: kotlin.Int): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun rangeCheckForAdd(/*0*/ index: kotlin.Int): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun readObject(/*0*/ s: java.io.ObjectInputStream!): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun remove(/*0*/ element: java.lang.Integer): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun removeAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun remove(/*0*/ element: java.lang.Integer!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun removeAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun removeAt(/*0*/ index: kotlin.Int): java.lang.Integer protected/*protected and package*/ open override /*1*/ /*fake_override*/ fun removeRange(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun retainAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun retainAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun set(/*0*/ index: kotlin.Int, /*1*/ element: java.lang.Integer): java.lang.Integer public open override /*1*/ /*fake_override*/ fun subList(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.collections.MutableList public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! diff --git a/compiler/testData/diagnostics/tests/sealed/protectedConstructors_enabled.fir.kt b/compiler/testData/diagnostics/tests/sealed/protectedConstructors_enabled.fir.kt index fa7dfe31465..c28a5e213c0 100644 --- a/compiler/testData/diagnostics/tests/sealed/protectedConstructors_enabled.fir.kt +++ b/compiler/testData/diagnostics/tests/sealed/protectedConstructors_enabled.fir.kt @@ -22,7 +22,7 @@ sealed class Case3 private constructor(val x: Int) { class Inheritor2 : Case3("Hello") } -class Case3Inheritor3 : Case3(20) // should be an error in 1.8 +class Case3Inheritor3 : Case3(20) sealed class Case4 { protected constructor(x: Int) diff --git a/compiler/testData/diagnostics/tests/sealed/protectedConstructors_enabled.kt b/compiler/testData/diagnostics/tests/sealed/protectedConstructors_enabled.kt index 892f5d0bda0..efe06d53d41 100644 --- a/compiler/testData/diagnostics/tests/sealed/protectedConstructors_enabled.kt +++ b/compiler/testData/diagnostics/tests/sealed/protectedConstructors_enabled.kt @@ -22,7 +22,7 @@ sealed class Case3 private constructor(val x: Int) { class Inheritor2 : Case3("Hello") } -class Case3Inheritor3 : Case3(20) // should be an error in 1.8 +class Case3Inheritor3 : Case3(20) sealed class Case4 { protected constructor(x: Int) diff --git a/compiler/testData/diagnostics/tests/smartCasts/loops/elvisIfBreakInsideWhileTrue.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/loops/elvisIfBreakInsideWhileTrue.fir.kt deleted file mode 100644 index e1d79e1e21d..00000000000 --- a/compiler/testData/diagnostics/tests/smartCasts/loops/elvisIfBreakInsideWhileTrue.fir.kt +++ /dev/null @@ -1,9 +0,0 @@ -public fun foo(x: String?, y: String?): Int { - while (true) { - x ?: if (y == null) break - // y is nullable if x != null - y.length - } - // y is null because of the break - return y.length -} diff --git a/compiler/testData/diagnostics/tests/smartCasts/loops/elvisIfBreakInsideWhileTrue.kt b/compiler/testData/diagnostics/tests/smartCasts/loops/elvisIfBreakInsideWhileTrue.kt index 86612589d05..269e77e36ff 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/loops/elvisIfBreakInsideWhileTrue.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/loops/elvisIfBreakInsideWhileTrue.kt @@ -1,6 +1,7 @@ +// FIR_IDENTICAL public fun foo(x: String?, y: String?): Int { while (true) { - x ?: if (y == null) break + x ?: if (y == null) break // y is nullable if x != null y.length } diff --git a/compiler/testData/diagnostics/tests/subtyping/kt-1457.txt b/compiler/testData/diagnostics/tests/subtyping/kt-1457.txt index d66f19e2d52..55a206d592b 100644 --- a/compiler/testData/diagnostics/tests/subtyping/kt-1457.txt +++ b/compiler/testData/diagnostics/tests/subtyping/kt-1457.txt @@ -15,8 +15,8 @@ public final class MyListOfPairs : java.util.ArrayList> { invisible_fake open override /*1*/ /*fake_override*/ fun batchRemove(/*0*/ c: kotlin.collections.(Mutable)Collection<*>!, /*1*/ complement: kotlin.Boolean): 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 contains(/*0*/ element: Pair): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun containsAll(/*0*/ elements: kotlin.collections.Collection>): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun contains(/*0*/ element: Pair!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun containsAll(/*0*/ elements: kotlin.collections.Collection!>): kotlin.Boolean invisible_fake open override /*1*/ /*fake_override*/ fun elementData(/*0*/ index: kotlin.Int): Pair! public open override /*1*/ /*fake_override*/ fun ensureCapacity(/*0*/ minCapacity: kotlin.Int): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun ensureCapacityInternal(/*0*/ minCapacity: kotlin.Int): kotlin.Unit @@ -26,21 +26,21 @@ public final class MyListOfPairs : java.util.ArrayList> { public open override /*1*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): Pair invisible_fake open override /*1*/ /*fake_override*/ fun grow(/*0*/ minCapacity: kotlin.Int): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ element: Pair): kotlin.Int + public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ element: Pair!): kotlin.Int public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.collections.MutableIterator> - public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ element: Pair): kotlin.Int + public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ element: Pair!): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.collections.MutableListIterator> public open override /*1*/ /*fake_override*/ fun listIterator(/*0*/ index: kotlin.Int): kotlin.collections.MutableListIterator> invisible_fake open override /*1*/ /*fake_override*/ fun outOfBoundsMsg(/*0*/ index: kotlin.Int): kotlin.String! invisible_fake open override /*1*/ /*fake_override*/ fun rangeCheck(/*0*/ index: kotlin.Int): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun rangeCheckForAdd(/*0*/ index: kotlin.Int): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun readObject(/*0*/ s: java.io.ObjectInputStream!): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun remove(/*0*/ element: Pair): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun removeAll(/*0*/ elements: kotlin.collections.Collection>): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun remove(/*0*/ element: Pair!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun removeAll(/*0*/ elements: kotlin.collections.Collection!>): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun removeAt(/*0*/ index: kotlin.Int): Pair protected/*protected and package*/ open override /*1*/ /*fake_override*/ fun removeRange(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun retainAll(/*0*/ elements: kotlin.collections.Collection>): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun retainAll(/*0*/ elements: kotlin.collections.Collection!>): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun set(/*0*/ index: kotlin.Int, /*1*/ element: Pair): Pair public open override /*1*/ /*fake_override*/ fun subList(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.collections.MutableList> public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! diff --git a/compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/hashMapGetOrDefault.txt b/compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/hashMapGetOrDefault.txt index eb0cddc72d8..a39ed4d04e7 100644 --- a/compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/hashMapGetOrDefault.txt +++ b/compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/hashMapGetOrDefault.txt @@ -19,13 +19,13 @@ public final class MyHashMap : java.util.HashMap { invisible_fake open override /*1*/ /*fake_override*/ fun capacity(): kotlin.Int 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 containsKey(/*0*/ key: kotlin.String): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun containsKey(/*0*/ key: kotlin.String!): kotlin.Boolean invisible_fake open override /*1*/ /*fake_override*/ fun containsNullValue(): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun containsValue(/*0*/ value: kotlin.String): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun containsValue(/*0*/ value: kotlin.String!): kotlin.Boolean invisible_fake open override /*1*/ /*fake_override*/ fun createEntry(/*0*/ hash: kotlin.Int, /*1*/ key: kotlin.String!, /*2*/ value: kotlin.String!, /*3*/ bucketIndex: kotlin.Int): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun entrySet0(): kotlin.collections.(Mutable)Set!>! public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun get(/*0*/ key: kotlin.String): kotlin.String? + public open override /*1*/ /*fake_override*/ fun get(/*0*/ key: kotlin.String!): kotlin.String? invisible_fake final override /*1*/ /*fake_override*/ fun getEntry(/*0*/ key: kotlin.Any!): java.util.HashMap.Entry! invisible_fake open override /*1*/ /*fake_override*/ fun getForNullKey(): kotlin.String! public final fun getOrDefault(/*0*/ key: kotlin.String, /*1*/ defaultValue: kotlin.String): kotlin.String @@ -45,7 +45,7 @@ public final class MyHashMap : java.util.HashMap { invisible_fake open override /*1*/ /*fake_override*/ fun putForCreate(/*0*/ key: kotlin.String!, /*1*/ value: kotlin.String!): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun putForNullKey(/*0*/ value: kotlin.String!): kotlin.String! invisible_fake open override /*1*/ /*fake_override*/ fun readObject(/*0*/ s: java.io.ObjectInputStream!): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String): kotlin.String? + public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String!): kotlin.String? invisible_fake final override /*1*/ /*fake_override*/ fun removeEntryForKey(/*0*/ key: kotlin.Any!): java.util.HashMap.Entry! invisible_fake final override /*1*/ /*fake_override*/ fun removeMapping(/*0*/ o: kotlin.Any!): java.util.HashMap.Entry! invisible_fake open override /*1*/ /*fake_override*/ fun resize(/*0*/ newCapacity: kotlin.Int): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/targetedBuiltIns/concurrentMapRemove.kt b/compiler/testData/diagnostics/tests/targetedBuiltIns/concurrentMapRemove.kt index 23ac45b6830..31e50ed7e04 100644 --- a/compiler/testData/diagnostics/tests/targetedBuiltIns/concurrentMapRemove.kt +++ b/compiler/testData/diagnostics/tests/targetedBuiltIns/concurrentMapRemove.kt @@ -16,6 +16,6 @@ fun foo() { concurrent.remove(null, null) // @PurelyImplements - concurrentHash.remove(null, 1) - concurrentHash.remove(null, null) + concurrentHash.remove(null, 1) + concurrentHash.remove(null, null) } diff --git a/compiler/testData/diagnostics/tests/targetedBuiltIns/mutableMapRemove.kt b/compiler/testData/diagnostics/tests/targetedBuiltIns/mutableMapRemove.kt index b0a4a912026..a136b0dc3ef 100644 --- a/compiler/testData/diagnostics/tests/targetedBuiltIns/mutableMapRemove.kt +++ b/compiler/testData/diagnostics/tests/targetedBuiltIns/mutableMapRemove.kt @@ -22,7 +22,7 @@ fun foo(x: MutableMap, y: java.util.HashMap, z: java.u y.remove("", 1) y.remove("", "") - y.remove("", null) + y.remove("", null) z.remove("", 1) z.remove("", "") diff --git a/compiler/testData/diagnostics/tests/targetedBuiltIns/mutableMapRemove.txt b/compiler/testData/diagnostics/tests/targetedBuiltIns/mutableMapRemove.txt index 51c970dec72..8130bb5bc63 100644 --- a/compiler/testData/diagnostics/tests/targetedBuiltIns/mutableMapRemove.txt +++ b/compiler/testData/diagnostics/tests/targetedBuiltIns/mutableMapRemove.txt @@ -14,7 +14,7 @@ public final class KotlinMap1 : java.util.AbstractMap { protected/*protected and package*/ open override /*1*/ /*fake_override*/ fun clone(): kotlin.Any! public open override /*1*/ /*fake_override*/ fun compute(/*0*/ p0: K!, /*1*/ p1: java.util.function.BiFunction): V? public open override /*1*/ /*fake_override*/ fun computeIfAbsent(/*0*/ p0: K!, /*1*/ p1: java.util.function.Function): V! - public open override /*1*/ /*fake_override*/ fun computeIfPresent(/*0*/ p0: K!, /*1*/ p1: java.util.function.BiFunction): V? + public open override /*1*/ /*fake_override*/ fun computeIfPresent(/*0*/ p0: K!, /*1*/ p1: java.util.function.BiFunction): V? public open override /*1*/ /*fake_override*/ fun containsKey(/*0*/ key: K!): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun containsValue(/*0*/ value: V!): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -23,7 +23,7 @@ public final class KotlinMap1 : java.util.AbstractMap { @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.PlatformDependent public open override /*1*/ /*fake_override*/ fun getOrDefault(/*0*/ key: K!, /*1*/ defaultValue: V!): V! public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun merge(/*0*/ p0: K!, /*1*/ p1: V, /*2*/ p2: java.util.function.BiFunction): V? + public open override /*1*/ /*fake_override*/ fun merge(/*0*/ p0: K!, /*1*/ p1: V & Any, /*2*/ p2: java.util.function.BiFunction): V? public open override /*1*/ /*fake_override*/ fun put(/*0*/ key: K!, /*1*/ value: V!): V? public open override /*1*/ /*fake_override*/ fun putAll(/*0*/ from: kotlin.collections.Map): kotlin.Unit public open override /*1*/ /*fake_override*/ fun putIfAbsent(/*0*/ p0: K!, /*1*/ p1: V!): V? 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/testsWithStdLib/coroutines/nonModifierFormForBuiltInWithFun.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/nonModifierFormForBuiltInWithFun.kt index 7aa35dbe217..5e39df19fa0 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/nonModifierFormForBuiltInWithFun.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/nonModifierFormForBuiltInWithFun.kt @@ -4,7 +4,7 @@ infix fun Int.suspend(c: () -> Unit) { c() } fun bar() { - 1 suspend fun() { + 1 suspend fun() { println() } @@ -12,7 +12,7 @@ fun bar() { println() } - 1 suspend @Ann fun() { + 1 suspend @Ann fun() { println() } } @@ -22,7 +22,7 @@ fun bar() { annotation class Ann fun main(suspend: WLambdaInvoke) { - 1 suspend fun() {} + 1 suspend fun() {} } class WLambdaInvoke { diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/synchronizedOnSuspend.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/synchronizedOnSuspend.kt index ca943d2c803..2623e445c7f 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/synchronizedOnSuspend.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/synchronizedOnSuspend.kt @@ -2,24 +2,24 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER // SKIP_TXT -@Synchronized +@Synchronized suspend fun foo(f: () -> Unit): Unit = f() fun builder(c: suspend () -> Unit) {} val a: suspend () -> Unit - get() = @Synchronized {} -val b: suspend () -> Unit = @Synchronized {} -val c = builder (@Synchronized {}) -val d = suspend @Synchronized {} + get() = @Synchronized {} +val b: suspend () -> Unit = @Synchronized {} +val c = builder (@Synchronized {}) +val d = suspend @Synchronized {} val e = @Synchronized suspend {} fun test() { - @Synchronized + @Synchronized suspend fun foo(f: () -> Unit): Unit = f() - val b: suspend () -> Unit = @Synchronized {} - val c = builder (@Synchronized {}) - val d = suspend @Synchronized {} + val b: suspend () -> Unit = @Synchronized {} + val c = builder (@Synchronized {}) + val d = suspend @Synchronized {} val e = @Synchronized suspend {} } diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/notNullAnnotation.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/notNullAnnotation.kt index cfa77186243..6b7dd9b2aad 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/notNullAnnotation.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/notNullAnnotation.kt @@ -22,5 +22,5 @@ interface TypePredicate : (KotlinType) -> Boolean { fun TypePredicate.expectedTypeFor(keys: Iterable): Map = keys.fold(SmartFMap.emptyMap()) { map, key -> - map.plus(key, this) + map.plus(key, this) } diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/notNullAnnotation.txt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/notNullAnnotation.txt index 64bd61bc4f7..54040a2b57c 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/notNullAnnotation.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/notNullAnnotation.txt @@ -22,7 +22,7 @@ public open class SmartFMap : kotl public abstract override /*1*/ /*fake_override*/ fun get(/*0*/ key: K!): V? public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public abstract override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean - public open fun plus(/*0*/ @org.jetbrains.annotations.NotNull key: K, /*1*/ value: V!): SmartFMap! + public open fun plus(/*0*/ @org.jetbrains.annotations.NotNull key: K & Any, /*1*/ value: V!): SmartFMap! public abstract override /*1*/ /*fake_override*/ fun put(/*0*/ key: K!, /*1*/ value: V!): V? public abstract override /*1*/ /*fake_override*/ fun putAll(/*0*/ from: kotlin.collections.Map): kotlin.Unit public abstract override /*1*/ /*fake_override*/ fun remove(/*0*/ key: K!): V? diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/kt36951.txt b/compiler/testData/diagnostics/testsWithStdLib/inference/kt36951.txt index bdfa63d269e..7dbf51e569d 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/kt36951.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/kt36951.txt @@ -8,17 +8,17 @@ public final class Base : kotlin.co public open override /*1*/ /*fake_override*/ fun addAll(/*0*/ elements: kotlin.collections.Collection): 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 contains(/*0*/ element: T): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun containsAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun contains(/*0*/ element: T!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun containsAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public final fun foo(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.collections.MutableIterator invisible_fake open override /*1*/ /*fake_override*/ fun readObject(/*0*/ s: java.io.ObjectInputStream!): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun remove(/*0*/ element: T): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun removeAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun retainAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun remove(/*0*/ element: T!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun removeAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun retainAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ a: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String diff --git a/compiler/testData/diagnostics/testsWithStdLib/java/concurrentHashMapContains.txt b/compiler/testData/diagnostics/testsWithStdLib/java/concurrentHashMapContains.txt index 0bb9bc22bb0..4c03a278a46 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/java/concurrentHashMapContains.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/java/concurrentHashMapContains.txt @@ -27,8 +27,8 @@ public final class A : java.util.concurrent.ConcurrentHashMap): kotlin.Int? public open override /*1*/ /*fake_override*/ fun contains(/*0*/ p0: kotlin.Any!): kotlin.Boolean public final operator fun contains(/*0*/ x: kotlin.Char): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun containsKey(/*0*/ key: kotlin.String): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun containsValue(/*0*/ value: kotlin.Int): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun containsKey(/*0*/ key: kotlin.String!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun containsValue(/*0*/ value: kotlin.Int!): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun elements(): java.util.Enumeration! 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 @@ -41,8 +41,8 @@ public final class A : java.util.concurrent.ConcurrentHashMap!): kotlin.Unit public open override /*1*/ /*fake_override*/ fun forEachValue(/*0*/ p0: kotlin.Long, /*1*/ p1: java.util.function.Function!, /*2*/ p2: java.util.function.Consumer!): kotlin.Unit invisible_fake final override /*1*/ /*fake_override*/ fun fullAddCount(/*0*/ p0: kotlin.Long, /*1*/ p1: kotlin.Boolean): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun get(/*0*/ key: kotlin.String): kotlin.Int? - public open override /*1*/ /*fake_override*/ fun getOrDefault(/*0*/ key: kotlin.String, /*1*/ defaultValue: kotlin.Int): kotlin.Int + public open override /*1*/ /*fake_override*/ fun get(/*0*/ key: kotlin.String!): kotlin.Int? + public open override /*1*/ /*fake_override*/ fun getOrDefault(/*0*/ key: kotlin.String!, /*1*/ defaultValue: kotlin.Int!): kotlin.Int public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int invisible_fake final override /*1*/ /*fake_override*/ fun helpTransfer(/*0*/ p0: kotlin.Array<(out) java.util.concurrent.ConcurrentHashMap.Node!>!, /*1*/ p1: java.util.concurrent.ConcurrentHashMap.Node!): kotlin.Array<(out) java.util.concurrent.ConcurrentHashMap.Node!>! invisible_fake final override /*1*/ /*fake_override*/ fun initTable(): kotlin.Array<(out) java.util.concurrent.ConcurrentHashMap.Node!>! @@ -75,8 +75,8 @@ public final class A : java.util.concurrent.ConcurrentHashMap!, /*2*/ p2: kotlin.Double, /*3*/ p3: java.util.function.DoubleBinaryOperator!): kotlin.Double public open override /*1*/ /*fake_override*/ fun reduceValuesToInt(/*0*/ p0: kotlin.Long, /*1*/ p1: java.util.function.ToIntFunction!, /*2*/ p2: kotlin.Int, /*3*/ p3: java.util.function.IntBinaryOperator!): kotlin.Int public open override /*1*/ /*fake_override*/ fun reduceValuesToLong(/*0*/ p0: kotlin.Long, /*1*/ p1: java.util.function.ToLongFunction!, /*2*/ p2: kotlin.Long, /*3*/ p3: java.util.function.LongBinaryOperator!): kotlin.Long - public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String): kotlin.Int? - public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String, /*1*/ value: kotlin.Int): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String!): kotlin.Int? + public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String!, /*1*/ value: kotlin.Int!): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun replace(/*0*/ p0: kotlin.String, /*1*/ p1: kotlin.Int): kotlin.Int? public open override /*1*/ /*fake_override*/ fun replace(/*0*/ p0: kotlin.String, /*1*/ p1: kotlin.Int, /*2*/ p2: kotlin.Int): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun replaceAll(/*0*/ p0: java.util.function.BiFunction): kotlin.Unit @@ -117,8 +117,8 @@ public final class B : java.util.concurrent.ConcurrentHashMap): kotlin.Int public open override /*1*/ /*fake_override*/ fun computeIfPresent(/*0*/ p0: kotlin.String, /*1*/ p1: java.util.function.BiFunction): kotlin.Int? public open override /*1*/ fun contains(/*0*/ value: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun containsKey(/*0*/ key: kotlin.String): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun containsValue(/*0*/ value: kotlin.Int): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun containsKey(/*0*/ key: kotlin.String!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun containsValue(/*0*/ value: kotlin.Int!): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun elements(): java.util.Enumeration! 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 @@ -131,8 +131,8 @@ public final class B : java.util.concurrent.ConcurrentHashMap!): kotlin.Unit public open override /*1*/ /*fake_override*/ fun forEachValue(/*0*/ p0: kotlin.Long, /*1*/ p1: java.util.function.Function!, /*2*/ p2: java.util.function.Consumer!): kotlin.Unit invisible_fake final override /*1*/ /*fake_override*/ fun fullAddCount(/*0*/ p0: kotlin.Long, /*1*/ p1: kotlin.Boolean): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun get(/*0*/ key: kotlin.String): kotlin.Int? - public open override /*1*/ /*fake_override*/ fun getOrDefault(/*0*/ key: kotlin.String, /*1*/ defaultValue: kotlin.Int): kotlin.Int + public open override /*1*/ /*fake_override*/ fun get(/*0*/ key: kotlin.String!): kotlin.Int? + public open override /*1*/ /*fake_override*/ fun getOrDefault(/*0*/ key: kotlin.String!, /*1*/ defaultValue: kotlin.Int!): kotlin.Int public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int invisible_fake final override /*1*/ /*fake_override*/ fun helpTransfer(/*0*/ p0: kotlin.Array<(out) java.util.concurrent.ConcurrentHashMap.Node!>!, /*1*/ p1: java.util.concurrent.ConcurrentHashMap.Node!): kotlin.Array<(out) java.util.concurrent.ConcurrentHashMap.Node!>! invisible_fake final override /*1*/ /*fake_override*/ fun initTable(): kotlin.Array<(out) java.util.concurrent.ConcurrentHashMap.Node!>! @@ -165,8 +165,8 @@ public final class B : java.util.concurrent.ConcurrentHashMap!, /*2*/ p2: kotlin.Double, /*3*/ p3: java.util.function.DoubleBinaryOperator!): kotlin.Double public open override /*1*/ /*fake_override*/ fun reduceValuesToInt(/*0*/ p0: kotlin.Long, /*1*/ p1: java.util.function.ToIntFunction!, /*2*/ p2: kotlin.Int, /*3*/ p3: java.util.function.IntBinaryOperator!): kotlin.Int public open override /*1*/ /*fake_override*/ fun reduceValuesToLong(/*0*/ p0: kotlin.Long, /*1*/ p1: java.util.function.ToLongFunction!, /*2*/ p2: kotlin.Long, /*3*/ p3: java.util.function.LongBinaryOperator!): kotlin.Long - public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String): kotlin.Int? - public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String, /*1*/ value: kotlin.Int): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String!): kotlin.Int? + public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String!, /*1*/ value: kotlin.Int!): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun replace(/*0*/ p0: kotlin.String, /*1*/ p1: kotlin.Int): kotlin.Int? public open override /*1*/ /*fake_override*/ fun replace(/*0*/ p0: kotlin.String, /*1*/ p1: kotlin.Int, /*2*/ p2: kotlin.Int): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun replaceAll(/*0*/ p0: java.util.function.BiFunction): kotlin.Unit @@ -207,8 +207,8 @@ public final class C : java.util.concurrent.ConcurrentHashMap): kotlin.Int public open override /*1*/ /*fake_override*/ fun computeIfPresent(/*0*/ p0: kotlin.String, /*1*/ p1: java.util.function.BiFunction): kotlin.Int? public open override /*1*/ fun contains(/*0*/ value: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun containsKey(/*0*/ key: kotlin.String): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun containsValue(/*0*/ value: kotlin.Int): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun containsKey(/*0*/ key: kotlin.String!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun containsValue(/*0*/ value: kotlin.Int!): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun elements(): java.util.Enumeration! 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 @@ -221,8 +221,8 @@ public final class C : java.util.concurrent.ConcurrentHashMap!): kotlin.Unit public open override /*1*/ /*fake_override*/ fun forEachValue(/*0*/ p0: kotlin.Long, /*1*/ p1: java.util.function.Function!, /*2*/ p2: java.util.function.Consumer!): kotlin.Unit invisible_fake final override /*1*/ /*fake_override*/ fun fullAddCount(/*0*/ p0: kotlin.Long, /*1*/ p1: kotlin.Boolean): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun get(/*0*/ key: kotlin.String): kotlin.Int? - public open override /*1*/ /*fake_override*/ fun getOrDefault(/*0*/ key: kotlin.String, /*1*/ defaultValue: kotlin.Int): kotlin.Int + public open override /*1*/ /*fake_override*/ fun get(/*0*/ key: kotlin.String!): kotlin.Int? + public open override /*1*/ /*fake_override*/ fun getOrDefault(/*0*/ key: kotlin.String!, /*1*/ defaultValue: kotlin.Int!): kotlin.Int public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int invisible_fake final override /*1*/ /*fake_override*/ fun helpTransfer(/*0*/ p0: kotlin.Array<(out) java.util.concurrent.ConcurrentHashMap.Node!>!, /*1*/ p1: java.util.concurrent.ConcurrentHashMap.Node!): kotlin.Array<(out) java.util.concurrent.ConcurrentHashMap.Node!>! invisible_fake final override /*1*/ /*fake_override*/ fun initTable(): kotlin.Array<(out) java.util.concurrent.ConcurrentHashMap.Node!>! @@ -255,8 +255,8 @@ public final class C : java.util.concurrent.ConcurrentHashMap!, /*2*/ p2: kotlin.Double, /*3*/ p3: java.util.function.DoubleBinaryOperator!): kotlin.Double public open override /*1*/ /*fake_override*/ fun reduceValuesToInt(/*0*/ p0: kotlin.Long, /*1*/ p1: java.util.function.ToIntFunction!, /*2*/ p2: kotlin.Int, /*3*/ p3: java.util.function.IntBinaryOperator!): kotlin.Int public open override /*1*/ /*fake_override*/ fun reduceValuesToLong(/*0*/ p0: kotlin.Long, /*1*/ p1: java.util.function.ToLongFunction!, /*2*/ p2: kotlin.Long, /*3*/ p3: java.util.function.LongBinaryOperator!): kotlin.Long - public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String): kotlin.Int? - public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String, /*1*/ value: kotlin.Int): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String!): kotlin.Int? + public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String!, /*1*/ value: kotlin.Int!): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun replace(/*0*/ p0: kotlin.String, /*1*/ p1: kotlin.Int): kotlin.Int? public open override /*1*/ /*fake_override*/ fun replace(/*0*/ p0: kotlin.String, /*1*/ p1: kotlin.Int, /*2*/ p2: kotlin.Int): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun replaceAll(/*0*/ p0: java.util.function.BiFunction): kotlin.Unit diff --git a/compiler/testData/diagnostics/testsWithStdLib/java/concurrentHashMapContainsError.txt b/compiler/testData/diagnostics/testsWithStdLib/java/concurrentHashMapContainsError.txt index 0bb9bc22bb0..4c03a278a46 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/java/concurrentHashMapContainsError.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/java/concurrentHashMapContainsError.txt @@ -27,8 +27,8 @@ public final class A : java.util.concurrent.ConcurrentHashMap): kotlin.Int? public open override /*1*/ /*fake_override*/ fun contains(/*0*/ p0: kotlin.Any!): kotlin.Boolean public final operator fun contains(/*0*/ x: kotlin.Char): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun containsKey(/*0*/ key: kotlin.String): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun containsValue(/*0*/ value: kotlin.Int): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun containsKey(/*0*/ key: kotlin.String!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun containsValue(/*0*/ value: kotlin.Int!): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun elements(): java.util.Enumeration! 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 @@ -41,8 +41,8 @@ public final class A : java.util.concurrent.ConcurrentHashMap!): kotlin.Unit public open override /*1*/ /*fake_override*/ fun forEachValue(/*0*/ p0: kotlin.Long, /*1*/ p1: java.util.function.Function!, /*2*/ p2: java.util.function.Consumer!): kotlin.Unit invisible_fake final override /*1*/ /*fake_override*/ fun fullAddCount(/*0*/ p0: kotlin.Long, /*1*/ p1: kotlin.Boolean): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun get(/*0*/ key: kotlin.String): kotlin.Int? - public open override /*1*/ /*fake_override*/ fun getOrDefault(/*0*/ key: kotlin.String, /*1*/ defaultValue: kotlin.Int): kotlin.Int + public open override /*1*/ /*fake_override*/ fun get(/*0*/ key: kotlin.String!): kotlin.Int? + public open override /*1*/ /*fake_override*/ fun getOrDefault(/*0*/ key: kotlin.String!, /*1*/ defaultValue: kotlin.Int!): kotlin.Int public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int invisible_fake final override /*1*/ /*fake_override*/ fun helpTransfer(/*0*/ p0: kotlin.Array<(out) java.util.concurrent.ConcurrentHashMap.Node!>!, /*1*/ p1: java.util.concurrent.ConcurrentHashMap.Node!): kotlin.Array<(out) java.util.concurrent.ConcurrentHashMap.Node!>! invisible_fake final override /*1*/ /*fake_override*/ fun initTable(): kotlin.Array<(out) java.util.concurrent.ConcurrentHashMap.Node!>! @@ -75,8 +75,8 @@ public final class A : java.util.concurrent.ConcurrentHashMap!, /*2*/ p2: kotlin.Double, /*3*/ p3: java.util.function.DoubleBinaryOperator!): kotlin.Double public open override /*1*/ /*fake_override*/ fun reduceValuesToInt(/*0*/ p0: kotlin.Long, /*1*/ p1: java.util.function.ToIntFunction!, /*2*/ p2: kotlin.Int, /*3*/ p3: java.util.function.IntBinaryOperator!): kotlin.Int public open override /*1*/ /*fake_override*/ fun reduceValuesToLong(/*0*/ p0: kotlin.Long, /*1*/ p1: java.util.function.ToLongFunction!, /*2*/ p2: kotlin.Long, /*3*/ p3: java.util.function.LongBinaryOperator!): kotlin.Long - public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String): kotlin.Int? - public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String, /*1*/ value: kotlin.Int): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String!): kotlin.Int? + public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String!, /*1*/ value: kotlin.Int!): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun replace(/*0*/ p0: kotlin.String, /*1*/ p1: kotlin.Int): kotlin.Int? public open override /*1*/ /*fake_override*/ fun replace(/*0*/ p0: kotlin.String, /*1*/ p1: kotlin.Int, /*2*/ p2: kotlin.Int): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun replaceAll(/*0*/ p0: java.util.function.BiFunction): kotlin.Unit @@ -117,8 +117,8 @@ public final class B : java.util.concurrent.ConcurrentHashMap): kotlin.Int public open override /*1*/ /*fake_override*/ fun computeIfPresent(/*0*/ p0: kotlin.String, /*1*/ p1: java.util.function.BiFunction): kotlin.Int? public open override /*1*/ fun contains(/*0*/ value: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun containsKey(/*0*/ key: kotlin.String): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun containsValue(/*0*/ value: kotlin.Int): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun containsKey(/*0*/ key: kotlin.String!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun containsValue(/*0*/ value: kotlin.Int!): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun elements(): java.util.Enumeration! 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 @@ -131,8 +131,8 @@ public final class B : java.util.concurrent.ConcurrentHashMap!): kotlin.Unit public open override /*1*/ /*fake_override*/ fun forEachValue(/*0*/ p0: kotlin.Long, /*1*/ p1: java.util.function.Function!, /*2*/ p2: java.util.function.Consumer!): kotlin.Unit invisible_fake final override /*1*/ /*fake_override*/ fun fullAddCount(/*0*/ p0: kotlin.Long, /*1*/ p1: kotlin.Boolean): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun get(/*0*/ key: kotlin.String): kotlin.Int? - public open override /*1*/ /*fake_override*/ fun getOrDefault(/*0*/ key: kotlin.String, /*1*/ defaultValue: kotlin.Int): kotlin.Int + public open override /*1*/ /*fake_override*/ fun get(/*0*/ key: kotlin.String!): kotlin.Int? + public open override /*1*/ /*fake_override*/ fun getOrDefault(/*0*/ key: kotlin.String!, /*1*/ defaultValue: kotlin.Int!): kotlin.Int public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int invisible_fake final override /*1*/ /*fake_override*/ fun helpTransfer(/*0*/ p0: kotlin.Array<(out) java.util.concurrent.ConcurrentHashMap.Node!>!, /*1*/ p1: java.util.concurrent.ConcurrentHashMap.Node!): kotlin.Array<(out) java.util.concurrent.ConcurrentHashMap.Node!>! invisible_fake final override /*1*/ /*fake_override*/ fun initTable(): kotlin.Array<(out) java.util.concurrent.ConcurrentHashMap.Node!>! @@ -165,8 +165,8 @@ public final class B : java.util.concurrent.ConcurrentHashMap!, /*2*/ p2: kotlin.Double, /*3*/ p3: java.util.function.DoubleBinaryOperator!): kotlin.Double public open override /*1*/ /*fake_override*/ fun reduceValuesToInt(/*0*/ p0: kotlin.Long, /*1*/ p1: java.util.function.ToIntFunction!, /*2*/ p2: kotlin.Int, /*3*/ p3: java.util.function.IntBinaryOperator!): kotlin.Int public open override /*1*/ /*fake_override*/ fun reduceValuesToLong(/*0*/ p0: kotlin.Long, /*1*/ p1: java.util.function.ToLongFunction!, /*2*/ p2: kotlin.Long, /*3*/ p3: java.util.function.LongBinaryOperator!): kotlin.Long - public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String): kotlin.Int? - public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String, /*1*/ value: kotlin.Int): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String!): kotlin.Int? + public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String!, /*1*/ value: kotlin.Int!): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun replace(/*0*/ p0: kotlin.String, /*1*/ p1: kotlin.Int): kotlin.Int? public open override /*1*/ /*fake_override*/ fun replace(/*0*/ p0: kotlin.String, /*1*/ p1: kotlin.Int, /*2*/ p2: kotlin.Int): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun replaceAll(/*0*/ p0: java.util.function.BiFunction): kotlin.Unit @@ -207,8 +207,8 @@ public final class C : java.util.concurrent.ConcurrentHashMap): kotlin.Int public open override /*1*/ /*fake_override*/ fun computeIfPresent(/*0*/ p0: kotlin.String, /*1*/ p1: java.util.function.BiFunction): kotlin.Int? public open override /*1*/ fun contains(/*0*/ value: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun containsKey(/*0*/ key: kotlin.String): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun containsValue(/*0*/ value: kotlin.Int): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun containsKey(/*0*/ key: kotlin.String!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun containsValue(/*0*/ value: kotlin.Int!): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun elements(): java.util.Enumeration! 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 @@ -221,8 +221,8 @@ public final class C : java.util.concurrent.ConcurrentHashMap!): kotlin.Unit public open override /*1*/ /*fake_override*/ fun forEachValue(/*0*/ p0: kotlin.Long, /*1*/ p1: java.util.function.Function!, /*2*/ p2: java.util.function.Consumer!): kotlin.Unit invisible_fake final override /*1*/ /*fake_override*/ fun fullAddCount(/*0*/ p0: kotlin.Long, /*1*/ p1: kotlin.Boolean): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun get(/*0*/ key: kotlin.String): kotlin.Int? - public open override /*1*/ /*fake_override*/ fun getOrDefault(/*0*/ key: kotlin.String, /*1*/ defaultValue: kotlin.Int): kotlin.Int + public open override /*1*/ /*fake_override*/ fun get(/*0*/ key: kotlin.String!): kotlin.Int? + public open override /*1*/ /*fake_override*/ fun getOrDefault(/*0*/ key: kotlin.String!, /*1*/ defaultValue: kotlin.Int!): kotlin.Int public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int invisible_fake final override /*1*/ /*fake_override*/ fun helpTransfer(/*0*/ p0: kotlin.Array<(out) java.util.concurrent.ConcurrentHashMap.Node!>!, /*1*/ p1: java.util.concurrent.ConcurrentHashMap.Node!): kotlin.Array<(out) java.util.concurrent.ConcurrentHashMap.Node!>! invisible_fake final override /*1*/ /*fake_override*/ fun initTable(): kotlin.Array<(out) java.util.concurrent.ConcurrentHashMap.Node!>! @@ -255,8 +255,8 @@ public final class C : java.util.concurrent.ConcurrentHashMap!, /*2*/ p2: kotlin.Double, /*3*/ p3: java.util.function.DoubleBinaryOperator!): kotlin.Double public open override /*1*/ /*fake_override*/ fun reduceValuesToInt(/*0*/ p0: kotlin.Long, /*1*/ p1: java.util.function.ToIntFunction!, /*2*/ p2: kotlin.Int, /*3*/ p3: java.util.function.IntBinaryOperator!): kotlin.Int public open override /*1*/ /*fake_override*/ fun reduceValuesToLong(/*0*/ p0: kotlin.Long, /*1*/ p1: java.util.function.ToLongFunction!, /*2*/ p2: kotlin.Long, /*3*/ p3: java.util.function.LongBinaryOperator!): kotlin.Long - public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String): kotlin.Int? - public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String, /*1*/ value: kotlin.Int): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String!): kotlin.Int? + public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.String!, /*1*/ value: kotlin.Int!): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun replace(/*0*/ p0: kotlin.String, /*1*/ p1: kotlin.Int): kotlin.Int? public open override /*1*/ /*fake_override*/ fun replace(/*0*/ p0: kotlin.String, /*1*/ p1: kotlin.Int, /*2*/ p2: kotlin.Int): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun replaceAll(/*0*/ p0: java.util.function.BiFunction): kotlin.Unit diff --git a/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableCollection.txt b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableCollection.txt index 6f71c17abae..da9b8d0e373 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableCollection.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableCollection.txt @@ -9,15 +9,15 @@ public fun foo(): kotlin.Unit public open override /*2*/ /*fake_override*/ fun add(/*0*/ element: T): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun addAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun clear(): kotlin.Unit - public open override /*2*/ /*fake_override*/ fun contains(/*0*/ element: T): kotlin.Boolean - public open override /*2*/ /*fake_override*/ fun containsAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*2*/ /*fake_override*/ fun contains(/*0*/ element: T!): kotlin.Boolean + public open override /*2*/ /*fake_override*/ fun containsAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*2*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean @java.lang.Override public open override /*2*/ fun iterator(): kotlin.collections.MutableIterator - public open override /*2*/ /*fake_override*/ fun remove(/*0*/ element: T): kotlin.Boolean - public open override /*2*/ /*fake_override*/ fun removeAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean - public open override /*2*/ /*fake_override*/ fun retainAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*2*/ /*fake_override*/ fun remove(/*0*/ element: T!): kotlin.Boolean + public open override /*2*/ /*fake_override*/ fun removeAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*2*/ /*fake_override*/ fun retainAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ a: kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String diff --git a/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableList.txt b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableList.txt index 802ee4a0975..03a743132f9 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableList.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableList.txt @@ -12,24 +12,24 @@ public fun foo(): kotlin.Unit public open override /*2*/ /*fake_override*/ fun addAll(/*0*/ index: kotlin.Int, /*1*/ elements: kotlin.collections.Collection): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun addAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun clear(): kotlin.Unit - public open override /*2*/ /*fake_override*/ fun contains(/*0*/ element: T): kotlin.Boolean - public open override /*2*/ /*fake_override*/ fun containsAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*2*/ /*fake_override*/ fun contains(/*0*/ element: T!): kotlin.Boolean + public open override /*2*/ /*fake_override*/ fun containsAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @java.lang.Override public open override /*2*/ fun get(/*0*/ index: kotlin.Int): T public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*2*/ /*fake_override*/ fun indexOf(/*0*/ element: T): kotlin.Int + public open override /*2*/ /*fake_override*/ fun indexOf(/*0*/ element: T!): kotlin.Int public open override /*2*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun iterator(): kotlin.collections.MutableIterator - public open override /*2*/ /*fake_override*/ fun lastIndexOf(/*0*/ element: T): kotlin.Int + public open override /*2*/ /*fake_override*/ fun lastIndexOf(/*0*/ element: T!): kotlin.Int public open override /*2*/ /*fake_override*/ fun listIterator(): kotlin.collections.MutableListIterator public open override /*2*/ /*fake_override*/ fun listIterator(/*0*/ index: kotlin.Int): kotlin.collections.MutableListIterator invisible_fake open override /*1*/ /*fake_override*/ fun outOfBoundsMsg(/*0*/ index: kotlin.Int): kotlin.String! invisible_fake open override /*1*/ /*fake_override*/ fun rangeCheckForAdd(/*0*/ index: kotlin.Int): kotlin.Unit - public open override /*2*/ /*fake_override*/ fun remove(/*0*/ element: T): kotlin.Boolean - public open override /*2*/ /*fake_override*/ fun removeAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*2*/ /*fake_override*/ fun remove(/*0*/ element: T!): kotlin.Boolean + public open override /*2*/ /*fake_override*/ fun removeAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun removeAt(/*0*/ index: kotlin.Int): T protected/*protected and package*/ open override /*1*/ /*fake_override*/ fun removeRange(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.Unit - public open override /*2*/ /*fake_override*/ fun retainAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*2*/ /*fake_override*/ fun retainAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun set(/*0*/ index: kotlin.Int, /*1*/ element: T): T public open override /*2*/ /*fake_override*/ fun subList(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.collections.MutableList public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! diff --git a/compiler/testData/ir/irText/firProblems/AbstractMutableMap.ir.txt b/compiler/testData/ir/irText/firProblems/AbstractMutableMap.ir.txt index 74cbd826023..b9eb7e6cf11 100644 --- a/compiler/testData/ir/irText/firProblems/AbstractMutableMap.ir.txt +++ b/compiler/testData/ir/irText/firProblems/AbstractMutableMap.ir.txt @@ -76,7 +76,7 @@ FILE fqName: fileName:/AbstractMutableMap.kt VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] java.util.function.Function.MyMap, out @[EnhancedNullability] V of .MyMap> FUN FAKE_OVERRIDE name:computeIfPresent visibility:public modality:OPEN <> ($this:kotlin.collections.MutableMap.MyMap, V of .MyMap>, p0:@[EnhancedNullability] K of .MyMap, p1:@[EnhancedNullability] java.util.function.BiFunction.MyMap, in @[EnhancedNullability] V of .MyMap, out @[EnhancedNullability] V of .MyMap?>) returnType:@[EnhancedNullability] V of .MyMap? [fake_override] overridden: - public open fun computeIfPresent (p0: @[EnhancedNullability] K of kotlin.collections.AbstractMutableMap, p1: @[EnhancedNullability] java.util.function.BiFunction): @[EnhancedNullability] V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap + public open fun computeIfPresent (p0: @[EnhancedNullability] K of kotlin.collections.AbstractMutableMap, p1: @[EnhancedNullability] java.util.function.BiFunction): @[EnhancedNullability] V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap $this: VALUE_PARAMETER name: type:kotlin.collections.MutableMap.MyMap, V of .MyMap> VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] K of .MyMap VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] java.util.function.BiFunction.MyMap, in @[EnhancedNullability] V of .MyMap, out @[EnhancedNullability] V of .MyMap?> @@ -124,7 +124,7 @@ FILE fqName: fileName:/AbstractMutableMap.kt $this: VALUE_PARAMETER name: type:kotlin.collections.Map.MyMap, V of .MyMap> FUN FAKE_OVERRIDE name:merge visibility:public modality:OPEN <> ($this:kotlin.collections.MutableMap.MyMap, V of .MyMap>, p0:@[EnhancedNullability] K of .MyMap, p1:@[EnhancedNullability] V of .MyMap, p2:@[EnhancedNullability] java.util.function.BiFunction.MyMap, in @[EnhancedNullability] V of .MyMap, out @[EnhancedNullability] V of .MyMap?>) returnType:@[EnhancedNullability] V of .MyMap? [fake_override] overridden: - public open fun merge (p0: @[EnhancedNullability] K of kotlin.collections.AbstractMutableMap, p1: @[EnhancedNullability] V of kotlin.collections.AbstractMutableMap, p2: @[EnhancedNullability] java.util.function.BiFunction): @[EnhancedNullability] V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap + public open fun merge (p0: @[EnhancedNullability] K of kotlin.collections.AbstractMutableMap, p1: @[EnhancedNullability] {V of kotlin.collections.AbstractMutableMap & Any}, p2: @[EnhancedNullability] java.util.function.BiFunction): @[EnhancedNullability] V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap $this: VALUE_PARAMETER name: type:kotlin.collections.MutableMap.MyMap, V of .MyMap> VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] K of .MyMap VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] V of .MyMap diff --git a/compiler/testData/ir/irText/firProblems/ArrayListOverrides.ir.txt b/compiler/testData/ir/irText/firProblems/ArrayListOverrides.ir.txt index fff737ab743..fb74912f754 100644 --- a/compiler/testData/ir/irText/firProblems/ArrayListOverrides.ir.txt +++ b/compiler/testData/ir/irText/firProblems/ArrayListOverrides.ir.txt @@ -36,31 +36,31 @@ FILE fqName: fileName:/ArrayListOverrides.kt overridden: public open fun iterator (): @[EnhancedNullability] kotlin.collections.MutableIterator<@[EnhancedNullability] E of java.util.ArrayList> [operator] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - FUN FAKE_OVERRIDE name:remove visibility:public modality:OPEN <> ($this:java.util.ArrayList, element:@[EnhancedNullability] kotlin.String) returnType:kotlin.Boolean [fake_override] + FUN FAKE_OVERRIDE name:remove visibility:public modality:OPEN <> ($this:java.util.ArrayList, element:@[FlexibleNullability] kotlin.String?) returnType:kotlin.Boolean [fake_override] overridden: - public open fun remove (element: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Boolean declared in java.util.ArrayList + public open fun remove (element: @[FlexibleNullability] E of java.util.ArrayList?): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:element index:0 type:@[EnhancedNullability] kotlin.String - FUN FAKE_OVERRIDE name:removeAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, elements:kotlin.collections.Collection<@[EnhancedNullability] kotlin.String>) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:element index:0 type:@[FlexibleNullability] kotlin.String? + FUN FAKE_OVERRIDE name:removeAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, elements:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun removeAll (elements: kotlin.collections.Collection<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Boolean declared in java.util.ArrayList + public open fun removeAll (elements: kotlin.collections.Collection<@[FlexibleNullability] E of java.util.ArrayList?>): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[EnhancedNullability] kotlin.String> - FUN FAKE_OVERRIDE name:retainAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, elements:kotlin.collections.Collection<@[EnhancedNullability] kotlin.String>) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> + FUN FAKE_OVERRIDE name:retainAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, elements:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun retainAll (elements: kotlin.collections.Collection<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Boolean declared in java.util.ArrayList + public open fun retainAll (elements: kotlin.collections.Collection<@[FlexibleNullability] E of java.util.ArrayList?>): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[EnhancedNullability] kotlin.String> - FUN FAKE_OVERRIDE name:contains visibility:public modality:OPEN <> ($this:java.util.ArrayList, element:@[EnhancedNullability] kotlin.String) returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> + FUN FAKE_OVERRIDE name:contains visibility:public modality:OPEN <> ($this:java.util.ArrayList, element:@[FlexibleNullability] kotlin.String?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun contains (element: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Boolean [operator] declared in java.util.ArrayList + public open fun contains (element: @[FlexibleNullability] E of java.util.ArrayList?): kotlin.Boolean [operator] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:element index:0 type:@[EnhancedNullability] kotlin.String - FUN FAKE_OVERRIDE name:containsAll visibility:public modality:OPEN <> ($this:java.util.AbstractCollection<@[FlexibleNullability] kotlin.String?>, elements:kotlin.collections.Collection<@[EnhancedNullability] kotlin.String>) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:element index:0 type:@[FlexibleNullability] kotlin.String? + FUN FAKE_OVERRIDE name:containsAll visibility:public modality:OPEN <> ($this:java.util.AbstractCollection<@[FlexibleNullability] kotlin.String?>, elements:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun containsAll (elements: kotlin.collections.Collection<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Boolean [fake_override] declared in java.util.ArrayList + public open fun containsAll (elements: kotlin.collections.Collection<@[FlexibleNullability] E of java.util.ArrayList?>): kotlin.Boolean [fake_override] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.AbstractCollection<@[FlexibleNullability] kotlin.String?> - VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[EnhancedNullability] kotlin.String> + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> FUN FAKE_OVERRIDE name:isEmpty visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Boolean [fake_override] overridden: public open fun isEmpty (): kotlin.Boolean declared in java.util.ArrayList @@ -141,16 +141,16 @@ FILE fqName: fileName:/ArrayListOverrides.kt public open fun get (index: kotlin.Int): @[EnhancedNullability] E of java.util.ArrayList [operator] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:index index:0 type:kotlin.Int - FUN FAKE_OVERRIDE name:indexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, element:@[EnhancedNullability] kotlin.String) returnType:kotlin.Int [fake_override] + FUN FAKE_OVERRIDE name:indexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, element:@[FlexibleNullability] kotlin.String?) returnType:kotlin.Int [fake_override] overridden: - public open fun indexOf (element: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Int declared in java.util.ArrayList + public open fun indexOf (element: @[FlexibleNullability] E of java.util.ArrayList?): kotlin.Int declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:element index:0 type:@[EnhancedNullability] kotlin.String - FUN FAKE_OVERRIDE name:lastIndexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, element:@[EnhancedNullability] kotlin.String) returnType:kotlin.Int [fake_override] + VALUE_PARAMETER name:element index:0 type:@[FlexibleNullability] kotlin.String? + FUN FAKE_OVERRIDE name:lastIndexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, element:@[FlexibleNullability] kotlin.String?) returnType:kotlin.Int [fake_override] overridden: - public open fun lastIndexOf (element: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Int declared in java.util.ArrayList + public open fun lastIndexOf (element: @[FlexibleNullability] E of java.util.ArrayList?): kotlin.Int declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:element index:0 type:@[EnhancedNullability] kotlin.String + VALUE_PARAMETER name:element index:0 type:@[FlexibleNullability] kotlin.String? FUN FAKE_OVERRIDE name:replaceAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] java.util.function.UnaryOperator<@[EnhancedNullability] kotlin.String>) returnType:kotlin.Unit [fake_override] overridden: public open fun replaceAll (p0: @[EnhancedNullability] java.util.function.UnaryOperator<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Unit declared in java.util.ArrayList @@ -200,7 +200,7 @@ FILE fqName: fileName:/ArrayListOverrides.kt INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A2 modality:FINAL visibility:public superTypes:[java.util.ArrayList]' FUN name:remove visibility:public modality:OPEN <> ($this:.A2, x:kotlin.String) returnType:kotlin.Boolean overridden: - public open fun remove (element: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Boolean declared in java.util.ArrayList + public open fun remove (element: @[FlexibleNullability] E of java.util.ArrayList?): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:.A2 VALUE_PARAMETER name:x index:0 type:kotlin.String BLOCK_BODY @@ -236,26 +236,26 @@ FILE fqName: fileName:/ArrayListOverrides.kt overridden: public open fun iterator (): @[EnhancedNullability] kotlin.collections.MutableIterator<@[EnhancedNullability] E of java.util.ArrayList> [operator] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - FUN FAKE_OVERRIDE name:removeAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, elements:kotlin.collections.Collection<@[EnhancedNullability] kotlin.String>) returnType:kotlin.Boolean [fake_override] + FUN FAKE_OVERRIDE name:removeAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, elements:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun removeAll (elements: kotlin.collections.Collection<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Boolean declared in java.util.ArrayList + public open fun removeAll (elements: kotlin.collections.Collection<@[FlexibleNullability] E of java.util.ArrayList?>): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[EnhancedNullability] kotlin.String> - FUN FAKE_OVERRIDE name:retainAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, elements:kotlin.collections.Collection<@[EnhancedNullability] kotlin.String>) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> + FUN FAKE_OVERRIDE name:retainAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, elements:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun retainAll (elements: kotlin.collections.Collection<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Boolean declared in java.util.ArrayList + public open fun retainAll (elements: kotlin.collections.Collection<@[FlexibleNullability] E of java.util.ArrayList?>): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[EnhancedNullability] kotlin.String> - FUN FAKE_OVERRIDE name:contains visibility:public modality:OPEN <> ($this:java.util.ArrayList, element:@[EnhancedNullability] kotlin.String) returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> + FUN FAKE_OVERRIDE name:contains visibility:public modality:OPEN <> ($this:java.util.ArrayList, element:@[FlexibleNullability] kotlin.String?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun contains (element: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Boolean [operator] declared in java.util.ArrayList + public open fun contains (element: @[FlexibleNullability] E of java.util.ArrayList?): kotlin.Boolean [operator] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:element index:0 type:@[EnhancedNullability] kotlin.String - FUN FAKE_OVERRIDE name:containsAll visibility:public modality:OPEN <> ($this:java.util.AbstractCollection<@[FlexibleNullability] kotlin.String?>, elements:kotlin.collections.Collection<@[EnhancedNullability] kotlin.String>) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:element index:0 type:@[FlexibleNullability] kotlin.String? + FUN FAKE_OVERRIDE name:containsAll visibility:public modality:OPEN <> ($this:java.util.AbstractCollection<@[FlexibleNullability] kotlin.String?>, elements:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun containsAll (elements: kotlin.collections.Collection<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Boolean [fake_override] declared in java.util.ArrayList + public open fun containsAll (elements: kotlin.collections.Collection<@[FlexibleNullability] E of java.util.ArrayList?>): kotlin.Boolean [fake_override] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.AbstractCollection<@[FlexibleNullability] kotlin.String?> - VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[EnhancedNullability] kotlin.String> + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> FUN FAKE_OVERRIDE name:isEmpty visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Boolean [fake_override] overridden: public open fun isEmpty (): kotlin.Boolean declared in java.util.ArrayList @@ -336,16 +336,16 @@ FILE fqName: fileName:/ArrayListOverrides.kt public open fun get (index: kotlin.Int): @[EnhancedNullability] E of java.util.ArrayList [operator] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:index index:0 type:kotlin.Int - FUN FAKE_OVERRIDE name:indexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, element:@[EnhancedNullability] kotlin.String) returnType:kotlin.Int [fake_override] + FUN FAKE_OVERRIDE name:indexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, element:@[FlexibleNullability] kotlin.String?) returnType:kotlin.Int [fake_override] overridden: - public open fun indexOf (element: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Int declared in java.util.ArrayList + public open fun indexOf (element: @[FlexibleNullability] E of java.util.ArrayList?): kotlin.Int declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:element index:0 type:@[EnhancedNullability] kotlin.String - FUN FAKE_OVERRIDE name:lastIndexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, element:@[EnhancedNullability] kotlin.String) returnType:kotlin.Int [fake_override] + VALUE_PARAMETER name:element index:0 type:@[FlexibleNullability] kotlin.String? + FUN FAKE_OVERRIDE name:lastIndexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, element:@[FlexibleNullability] kotlin.String?) returnType:kotlin.Int [fake_override] overridden: - public open fun lastIndexOf (element: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Int declared in java.util.ArrayList + public open fun lastIndexOf (element: @[FlexibleNullability] E of java.util.ArrayList?): kotlin.Int declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:element index:0 type:@[EnhancedNullability] kotlin.String + VALUE_PARAMETER name:element index:0 type:@[FlexibleNullability] kotlin.String? FUN FAKE_OVERRIDE name:replaceAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] java.util.function.UnaryOperator<@[EnhancedNullability] kotlin.String>) returnType:kotlin.Unit [fake_override] overridden: public open fun replaceAll (p0: @[EnhancedNullability] java.util.function.UnaryOperator<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Unit declared in java.util.ArrayList diff --git a/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.ir.txt b/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.ir.txt index 0aa801514a8..edb47c7fdcb 100644 --- a/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.ir.txt +++ b/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.ir.txt @@ -153,7 +153,7 @@ FILE fqName: fileName:/ClashResolutionDescriptor.kt BLOCK type=kotlin.collections.Collection<.ComponentDescriptor> origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.collections.Collection<.ComponentDescriptor>? [val] TYPE_OP type=kotlin.collections.Collection<.ComponentDescriptor>? origin=SAFE_CAST typeOperand=kotlin.collections.Collection<.ComponentDescriptor> - CALL 'public open fun get (key: @[EnhancedNullability] K of java.util.HashMap): @[EnhancedNullability] V of java.util.HashMap? [operator] declared in java.util.HashMap' type=@[EnhancedNullability] kotlin.Any? origin=GET_ARRAY_ELEMENT + CALL 'public open fun get (key: @[FlexibleNullability] K of java.util.HashMap?): @[EnhancedNullability] V of java.util.HashMap? [operator] declared in java.util.HashMap' type=@[EnhancedNullability] kotlin.Any? origin=GET_ARRAY_ELEMENT $this: CALL 'private final fun (): java.util.HashMap{ kotlin.collections.TypeAliasesKt.HashMap } declared in ' type=java.util.HashMap{ kotlin.collections.TypeAliasesKt.HashMap } origin=GET_PROPERTY key: CALL 'public final fun (): java.lang.Class.PlatformExtensionsClashResolver> declared in .PlatformExtensionsClashResolver' type=java.lang.Class.PlatformSpecificExtension<*>> origin=GET_PROPERTY $this: GET_VAR 'val resolver: .PlatformExtensionsClashResolver<*> [val] declared in .resolveClashesIfAny' type=.PlatformExtensionsClashResolver<*> origin=null diff --git a/compiler/testData/ir/irText/firProblems/MultiList.ir.txt b/compiler/testData/ir/irText/firProblems/MultiList.ir.txt index 5fb5efa0b39..aed310849ce 100644 --- a/compiler/testData/ir/irText/firProblems/MultiList.ir.txt +++ b/compiler/testData/ir/irText/firProblems/MultiList.ir.txt @@ -209,13 +209,13 @@ FILE fqName: fileName:/MultiList.kt FUN FAKE_OVERRIDE name:contains visibility:public modality:OPEN <> ($this:kotlin.collections.List<.Some.SomeList>>, element:.Some.SomeList>) returnType:kotlin.Boolean [fake_override,operator] overridden: public abstract fun contains (element: .Some.MyList>): kotlin.Boolean [fake_override,operator] declared in .MyList - public open fun contains (element: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Boolean [operator] declared in java.util.ArrayList + public open fun contains (element: @[FlexibleNullability] E of java.util.ArrayList?): kotlin.Boolean [operator] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:kotlin.collections.List<.Some.SomeList>> VALUE_PARAMETER name:element index:0 type:.Some.SomeList> FUN FAKE_OVERRIDE name:containsAll visibility:public modality:OPEN <> ($this:kotlin.collections.List<.Some.SomeList>>, elements:kotlin.collections.Collection<.Some.SomeList>>) returnType:kotlin.Boolean [fake_override] overridden: public abstract fun containsAll (elements: kotlin.collections.Collection<.Some.MyList>>): kotlin.Boolean [fake_override] declared in .MyList - public open fun containsAll (elements: kotlin.collections.Collection<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Boolean [fake_override] declared in java.util.ArrayList + public open fun containsAll (elements: kotlin.collections.Collection<@[FlexibleNullability] E of java.util.ArrayList?>): kotlin.Boolean [fake_override] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:kotlin.collections.List<.Some.SomeList>> VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<.Some.SomeList>> FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] @@ -244,7 +244,7 @@ FILE fqName: fileName:/MultiList.kt FUN FAKE_OVERRIDE name:indexOf visibility:public modality:OPEN <> ($this:kotlin.collections.List<.Some.SomeList>>, element:.Some.SomeList>) returnType:kotlin.Int [fake_override] overridden: public abstract fun indexOf (element: .Some.MyList>): kotlin.Int [fake_override] declared in .MyList - public open fun indexOf (element: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Int declared in java.util.ArrayList + public open fun indexOf (element: @[FlexibleNullability] E of java.util.ArrayList?): kotlin.Int declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:kotlin.collections.List<.Some.SomeList>> VALUE_PARAMETER name:element index:0 type:.Some.SomeList> FUN FAKE_OVERRIDE name:isEmpty visibility:public modality:OPEN <> ($this:kotlin.collections.List<.Some.SomeList>>) returnType:kotlin.Boolean [fake_override] @@ -260,7 +260,7 @@ FILE fqName: fileName:/MultiList.kt FUN FAKE_OVERRIDE name:lastIndexOf visibility:public modality:OPEN <> ($this:kotlin.collections.List<.Some.SomeList>>, element:.Some.SomeList>) returnType:kotlin.Int [fake_override] overridden: public abstract fun lastIndexOf (element: .Some.MyList>): kotlin.Int [fake_override] declared in .MyList - public open fun lastIndexOf (element: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Int declared in java.util.ArrayList + public open fun lastIndexOf (element: @[FlexibleNullability] E of java.util.ArrayList?): kotlin.Int declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:kotlin.collections.List<.Some.SomeList>> VALUE_PARAMETER name:element index:0 type:.Some.SomeList> FUN FAKE_OVERRIDE name:listIterator visibility:public modality:OPEN <> ($this:java.util.ArrayList<.Some.SomeList>>) returnType:@[EnhancedNullability] kotlin.collections.MutableListIterator<@[EnhancedNullability] .Some.SomeList>> [fake_override] @@ -327,21 +327,21 @@ FILE fqName: fileName:/MultiList.kt overridden: public open fun clear (): kotlin.Unit declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList<.Some.SomeList>> - FUN FAKE_OVERRIDE name:remove visibility:public modality:OPEN <> ($this:java.util.ArrayList<.Some.SomeList>>, element:@[EnhancedNullability] .Some.SomeList>) returnType:kotlin.Boolean [fake_override] + FUN FAKE_OVERRIDE name:remove visibility:public modality:OPEN <> ($this:java.util.ArrayList<.Some.SomeList>>, element:@[FlexibleNullability] .Some.SomeList>?) returnType:kotlin.Boolean [fake_override] overridden: - public open fun remove (element: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Boolean declared in java.util.ArrayList + public open fun remove (element: @[FlexibleNullability] E of java.util.ArrayList?): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList<.Some.SomeList>> - VALUE_PARAMETER name:element index:0 type:@[EnhancedNullability] .Some.SomeList> - FUN FAKE_OVERRIDE name:removeAll visibility:public modality:OPEN <> ($this:java.util.ArrayList<.Some.SomeList>>, elements:kotlin.collections.Collection<@[EnhancedNullability] .Some.SomeList>>) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:element index:0 type:@[FlexibleNullability] .Some.SomeList>? + FUN FAKE_OVERRIDE name:removeAll visibility:public modality:OPEN <> ($this:java.util.ArrayList<.Some.SomeList>>, elements:kotlin.collections.Collection<@[FlexibleNullability] .Some.SomeList>?>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun removeAll (elements: kotlin.collections.Collection<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Boolean declared in java.util.ArrayList + public open fun removeAll (elements: kotlin.collections.Collection<@[FlexibleNullability] E of java.util.ArrayList?>): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList<.Some.SomeList>> - VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[EnhancedNullability] .Some.SomeList>> - FUN FAKE_OVERRIDE name:retainAll visibility:public modality:OPEN <> ($this:java.util.ArrayList<.Some.SomeList>>, elements:kotlin.collections.Collection<@[EnhancedNullability] .Some.SomeList>>) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[FlexibleNullability] .Some.SomeList>?> + FUN FAKE_OVERRIDE name:retainAll visibility:public modality:OPEN <> ($this:java.util.ArrayList<.Some.SomeList>>, elements:kotlin.collections.Collection<@[FlexibleNullability] .Some.SomeList>?>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun retainAll (elements: kotlin.collections.Collection<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Boolean declared in java.util.ArrayList + public open fun retainAll (elements: kotlin.collections.Collection<@[FlexibleNullability] E of java.util.ArrayList?>): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList<.Some.SomeList>> - VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[EnhancedNullability] .Some.SomeList>> + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[FlexibleNullability] .Some.SomeList>?> FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN <> ($this:java.util.ArrayList<.Some.SomeList>>) returnType:@[FlexibleNullability] kotlin.Array? [fake_override] overridden: public open fun toArray (): @[FlexibleNullability] kotlin.Array? declared in java.util.ArrayList @@ -519,21 +519,21 @@ FILE fqName: fileName:/MultiList.kt overridden: public open fun clear (): kotlin.Unit [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList<.Some> - FUN FAKE_OVERRIDE name:remove visibility:public modality:OPEN <> ($this:java.util.ArrayList<.Some>, element:@[EnhancedNullability] .Some) returnType:kotlin.Boolean [fake_override] + FUN FAKE_OVERRIDE name:remove visibility:public modality:OPEN <> ($this:java.util.ArrayList<.Some>, element:@[FlexibleNullability] .Some?) returnType:kotlin.Boolean [fake_override] overridden: - public open fun remove (element: @[EnhancedNullability] .Some.SomeList>): kotlin.Boolean [fake_override] declared in .SomeList + public open fun remove (element: @[FlexibleNullability] .Some.SomeList>?): kotlin.Boolean [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList<.Some> - VALUE_PARAMETER name:element index:0 type:@[EnhancedNullability] .Some - FUN FAKE_OVERRIDE name:removeAll visibility:public modality:OPEN <> ($this:java.util.ArrayList<.Some>, elements:kotlin.collections.Collection<@[EnhancedNullability] .Some>) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:element index:0 type:@[FlexibleNullability] .Some? + FUN FAKE_OVERRIDE name:removeAll visibility:public modality:OPEN <> ($this:java.util.ArrayList<.Some>, elements:kotlin.collections.Collection<@[FlexibleNullability] .Some?>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun removeAll (elements: kotlin.collections.Collection<@[EnhancedNullability] .Some.SomeList>>): kotlin.Boolean [fake_override] declared in .SomeList + public open fun removeAll (elements: kotlin.collections.Collection<@[FlexibleNullability] .Some.SomeList>?>): kotlin.Boolean [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList<.Some> - VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[EnhancedNullability] .Some> - FUN FAKE_OVERRIDE name:retainAll visibility:public modality:OPEN <> ($this:java.util.ArrayList<.Some>, elements:kotlin.collections.Collection<@[EnhancedNullability] .Some>) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[FlexibleNullability] .Some?> + FUN FAKE_OVERRIDE name:retainAll visibility:public modality:OPEN <> ($this:java.util.ArrayList<.Some>, elements:kotlin.collections.Collection<@[FlexibleNullability] .Some?>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun retainAll (elements: kotlin.collections.Collection<@[EnhancedNullability] .Some.SomeList>>): kotlin.Boolean [fake_override] declared in .SomeList + public open fun retainAll (elements: kotlin.collections.Collection<@[FlexibleNullability] .Some.SomeList>?>): kotlin.Boolean [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList<.Some> - VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[EnhancedNullability] .Some> + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[FlexibleNullability] .Some?> FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN <> ($this:java.util.ArrayList<.Some>) returnType:@[FlexibleNullability] kotlin.Array? [fake_override] overridden: public open fun toArray (): @[FlexibleNullability] kotlin.Array? [fake_override] declared in .SomeList diff --git a/compiler/testData/ir/irText/types/definitelyNonNullWithJava.fir.ir.txt b/compiler/testData/ir/irText/types/definitelyNonNullWithJava.fir.ir.txt deleted file mode 100644 index 5f194a6a802..00000000000 --- a/compiler/testData/ir/irText/types/definitelyNonNullWithJava.fir.ir.txt +++ /dev/null @@ -1,27 +0,0 @@ -FILE fqName: fileName:/main.kt - CLASS INTERFACE name:B modality:ABSTRACT visibility:public superTypes:[.A.B>] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.B.B> - TYPE_PARAMETER name:T1 index:0 variance: superTypes:[kotlin.Any?] reified:false - FUN name:foo visibility:public modality:ABSTRACT <> ($this:.B.B>, x:T1 of .B) returnType:T1 of .B - overridden: - public abstract fun foo (x: @[FlexibleNullability] T of .A?): @[FlexibleNullability] T of .A? declared in .A - $this: VALUE_PARAMETER name: type:.B.B> - VALUE_PARAMETER name:x index:0 type:T1 of .B - FUN name:bar visibility:public modality:ABSTRACT <> ($this:.B.B>, x:{T1 of .B & Any}) returnType:{T1 of .B & Any} - overridden: - public abstract fun bar (x: @[EnhancedNullability] {T of .A & Any}): @[EnhancedNullability] {T of .A & Any} declared in .A - $this: VALUE_PARAMETER name: type:.B.B> - VALUE_PARAMETER name:x index:0 type:{T1 of .B & Any} - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in .A - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int [fake_override] declared in .A - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String [fake_override] declared in .A - $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/types/definitelyNonNullWithJava.fir.kt.txt b/compiler/testData/ir/irText/types/definitelyNonNullWithJava.fir.kt.txt deleted file mode 100644 index 2e4d12b9033..00000000000 --- a/compiler/testData/ir/irText/types/definitelyNonNullWithJava.fir.kt.txt +++ /dev/null @@ -1,5 +0,0 @@ -interface B : A { - abstract override fun foo(x: T1): T1 - abstract override fun bar(x: (T1 & Any)): (T1 & Any) - -} diff --git a/compiler/testData/ir/irText/types/definitelyNonNullWithJava.ir.txt b/compiler/testData/ir/irText/types/definitelyNonNullWithJava.ir.txt index ae06f5d6816..5f194a6a802 100644 --- a/compiler/testData/ir/irText/types/definitelyNonNullWithJava.ir.txt +++ b/compiler/testData/ir/irText/types/definitelyNonNullWithJava.ir.txt @@ -9,7 +9,7 @@ FILE fqName: fileName:/main.kt VALUE_PARAMETER name:x index:0 type:T1 of .B FUN name:bar visibility:public modality:ABSTRACT <> ($this:.B.B>, x:{T1 of .B & Any}) returnType:{T1 of .B & Any} overridden: - public abstract fun bar (x: @[EnhancedNullability] T of .A): @[EnhancedNullability] T of .A declared in .A + public abstract fun bar (x: @[EnhancedNullability] {T of .A & Any}): @[EnhancedNullability] {T of .A & Any} declared in .A $this: VALUE_PARAMETER name: type:.B.B> VALUE_PARAMETER name:x index:0 type:{T1 of .B & Any} FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] diff --git a/compiler/testData/ir/irText/types/definitelyNonNullWithJava.kt b/compiler/testData/ir/irText/types/definitelyNonNullWithJava.kt index 55403195688..32f3c4d791a 100644 --- a/compiler/testData/ir/irText/types/definitelyNonNullWithJava.kt +++ b/compiler/testData/ir/irText/types/definitelyNonNullWithJava.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL //!LANGUAGE: +DefinitelyNonNullableTypes // TARGET_BACKEND: JVM diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClass.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClass.txt index 65cc32989e9..463dc75a5ad 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClass.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClass.txt @@ -4,11 +4,11 @@ public interface TypeParamOfClass { public interface Sub : test.TypeParamOfClass.Super { public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit - public abstract override /*1*/ fun foo(): T + public abstract override /*1*/ fun foo(): T & Any } public interface Super { public abstract fun dummy(): kotlin.Unit - @org.jetbrains.annotations.NotNull public abstract fun foo(): T + @org.jetbrains.annotations.NotNull public abstract fun foo(): T & Any } } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.txt index 023765ed689..d348dd1a04f 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.txt @@ -9,6 +9,6 @@ public interface TypeParamOfClassSubstituted { public interface Super { public abstract fun dummy(): kotlin.Unit - @org.jetbrains.annotations.NotNull public abstract fun foo(): T + @org.jetbrains.annotations.NotNull public abstract fun foo(): T & Any } } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfFun.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfFun.txt index fa253d10d59..963f425cc5c 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfFun.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfFun.txt @@ -4,11 +4,11 @@ public interface TypeParamOfFun { public interface Sub : test.TypeParamOfFun.Super { public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit - public abstract override /*1*/ fun foo(): E + public abstract override /*1*/ fun foo(): E & Any } public interface Super { public abstract fun dummy(): kotlin.Unit - @org.jetbrains.annotations.NotNull public abstract fun foo(): T + @org.jetbrains.annotations.NotNull public abstract fun foo(): T & Any } } diff --git a/compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.javac.txt b/compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.javac.txt index 5bf719d197e..6e6ae8ec45a 100644 --- a/compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.javac.txt +++ b/compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.javac.txt @@ -14,8 +14,8 @@ public final class C : java.util.ArrayList { invisible_fake open override /*1*/ /*fake_override*/ fun batchRemove(/*0*/ p0: kotlin.collections.(Mutable)Collection<*>!, /*1*/ p1: kotlin.Boolean): 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 contains(/*0*/ element: kotlin.String): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun containsAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun contains(/*0*/ element: kotlin.String!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun containsAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean invisible_fake open override /*1*/ /*fake_override*/ fun elementData(/*0*/ p0: kotlin.Int): kotlin.String! public open override /*1*/ /*fake_override*/ fun ensureCapacity(/*0*/ p0: kotlin.Int): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun ensureCapacityInternal(/*0*/ p0: kotlin.Int): kotlin.Unit @@ -24,10 +24,10 @@ public final class C : java.util.ArrayList { public open override /*1*/ /*fake_override*/ fun forEach(/*0*/ p0: java.util.function.Consumer!): kotlin.Unit public open override /*1*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): kotlin.String invisible_fake open override /*1*/ /*fake_override*/ fun grow(/*0*/ p0: kotlin.Int): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ element: kotlin.String): kotlin.Int + public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ element: kotlin.String!): kotlin.Int public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.collections.MutableIterator - public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ element: kotlin.String): kotlin.Int + public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ element: kotlin.String!): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.collections.MutableListIterator public open override /*1*/ /*fake_override*/ fun listIterator(/*0*/ index: kotlin.Int): kotlin.collections.MutableListIterator invisible_fake open override /*1*/ /*fake_override*/ fun outOfBoundsMsg(/*0*/ p0: kotlin.Int): kotlin.String! @@ -35,13 +35,13 @@ public final class C : java.util.ArrayList { invisible_fake open override /*1*/ /*fake_override*/ fun rangeCheck(/*0*/ p0: kotlin.Int): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun rangeCheckForAdd(/*0*/ p0: kotlin.Int): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun readObject(/*0*/ p0: java.io.ObjectInputStream!): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun remove(/*0*/ element: kotlin.String): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun removeAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun remove(/*0*/ element: kotlin.String!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun removeAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun removeAt(/*0*/ p0: kotlin.Int): kotlin.String public open override /*1*/ /*fake_override*/ fun removeIf(/*0*/ p0: java.util.function.Predicate): kotlin.Boolean protected/*protected and package*/ open override /*1*/ /*fake_override*/ fun removeRange(/*0*/ p0: kotlin.Int, /*1*/ p1: kotlin.Int): kotlin.Unit public open override /*1*/ /*fake_override*/ fun replaceAll(/*0*/ p0: java.util.function.UnaryOperator): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun retainAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun retainAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun set(/*0*/ index: kotlin.Int, /*1*/ element: kotlin.String): kotlin.String public open override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun sort(/*0*/ p0: java.util.Comparator!): kotlin.Unit public open override /*1*/ /*fake_override*/ fun spliterator(): java.util.Spliterator diff --git a/compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.runtime.txt b/compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.runtime.txt new file mode 100644 index 00000000000..72d15e209f2 --- /dev/null +++ b/compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.runtime.txt @@ -0,0 +1,54 @@ +package test + +public final class C : java.util.ArrayList { + /*primary*/ public constructor C() + invisible_fake final override /*1*/ /*fake_override*/ var elementData: kotlin.Array<(out) kotlin.Any!>! + protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int + invisible_fake final override /*1*/ /*fake_override*/ var size: kotlin.Int + public open override /*1*/ /*fake_override*/ val size: kotlin.Int + public open override /*1*/ /*fake_override*/ fun ``(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun add(/*0*/ kotlin.Int, /*1*/ kotlin.String): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun add(/*0*/ kotlin.String): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun addAll(/*0*/ kotlin.Int, /*1*/ kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun addAll(/*0*/ kotlin.collections.Collection): kotlin.Boolean + invisible_fake open override /*1*/ /*fake_override*/ fun batchRemove(/*0*/ kotlin.collections.(Mutable)Collection<*>!, /*1*/ kotlin.Boolean): 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 contains(/*0*/ kotlin.String): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun containsAll(/*0*/ kotlin.collections.Collection): kotlin.Boolean + invisible_fake open override /*1*/ /*fake_override*/ fun elementData(/*0*/ kotlin.Int): kotlin.String! + public open override /*1*/ /*fake_override*/ fun ensureCapacity(/*0*/ kotlin.Int): kotlin.Unit + invisible_fake open override /*1*/ /*fake_override*/ fun ensureCapacityInternal(/*0*/ kotlin.Int): kotlin.Unit + invisible_fake open override /*1*/ /*fake_override*/ fun ensureExplicitCapacity(/*0*/ kotlin.Int): kotlin.Unit + invisible_fake open override /*1*/ /*fake_override*/ fun fastRemove(/*0*/ kotlin.Int): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun forEach(/*0*/ java.util.function.Consumer!): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun get(/*0*/ kotlin.Int): kotlin.String + invisible_fake open override /*1*/ /*fake_override*/ fun grow(/*0*/ kotlin.Int): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ kotlin.String): kotlin.Int + public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.collections.MutableIterator + public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ kotlin.String): kotlin.Int + public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.collections.MutableListIterator + public open override /*1*/ /*fake_override*/ fun listIterator(/*0*/ kotlin.Int): kotlin.collections.MutableListIterator + invisible_fake open override /*1*/ /*fake_override*/ fun outOfBoundsMsg(/*0*/ kotlin.Int): kotlin.String! + public open override /*1*/ /*fake_override*/ fun parallelStream(): java.util.stream.Stream + invisible_fake open override /*1*/ /*fake_override*/ fun rangeCheck(/*0*/ kotlin.Int): kotlin.Unit + invisible_fake open override /*1*/ /*fake_override*/ fun rangeCheckForAdd(/*0*/ kotlin.Int): kotlin.Unit + invisible_fake open override /*1*/ /*fake_override*/ fun readObject(/*0*/ java.io.ObjectInputStream!): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun remove(/*0*/ kotlin.String): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun removeAll(/*0*/ kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun removeAt(/*0*/ kotlin.Int): kotlin.String + public open override /*1*/ /*fake_override*/ fun removeIf(/*0*/ java.util.function.Predicate): kotlin.Boolean + protected/*protected and package*/ open override /*1*/ /*fake_override*/ fun removeRange(/*0*/ kotlin.Int, /*1*/ kotlin.Int): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun replaceAll(/*0*/ java.util.function.UnaryOperator): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun retainAll(/*0*/ kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun set(/*0*/ kotlin.Int, /*1*/ kotlin.String): kotlin.String + public open override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun sort(/*0*/ java.util.Comparator!): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun spliterator(): java.util.Spliterator + public open override /*1*/ /*fake_override*/ fun stream(): java.util.stream.Stream + public open override /*1*/ /*fake_override*/ fun subList(/*0*/ kotlin.Int, /*1*/ kotlin.Int): kotlin.collections.MutableList + public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! + public open override /*1*/ /*fake_override*/ fun toArray(/*0*/ kotlin.Array<(out) T!>!): kotlin.Array<(out) T!>! + public open override /*1*/ /*fake_override*/ fun trimToSize(): kotlin.Unit + invisible_fake open override /*1*/ /*fake_override*/ fun writeObject(/*0*/ java.io.ObjectOutputStream!): kotlin.Unit +} diff --git a/compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.txt b/compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.txt index e014541e3fd..78a35a571c6 100644 --- a/compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.txt +++ b/compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.txt @@ -14,8 +14,8 @@ public final class C : java.util.ArrayList { invisible_fake open override /*1*/ /*fake_override*/ fun batchRemove(/*0*/ p0: kotlin.collections.(Mutable)Collection<*>!, /*1*/ p1: kotlin.Boolean): 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 contains(/*0*/ element: kotlin.String): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun containsAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun contains(/*0*/ element: kotlin.String!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun containsAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean invisible_fake open override /*1*/ /*fake_override*/ fun elementData(/*0*/ p0: kotlin.Int): kotlin.String! public open override /*1*/ /*fake_override*/ fun ensureCapacity(/*0*/ p0: kotlin.Int): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun ensureCapacityInternal(/*0*/ p0: kotlin.Int): kotlin.Unit @@ -23,21 +23,21 @@ public final class C : java.util.ArrayList { invisible_fake open override /*1*/ /*fake_override*/ fun fastRemove(/*0*/ p0: kotlin.Int): kotlin.Unit public open override /*1*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): kotlin.String invisible_fake open override /*1*/ /*fake_override*/ fun grow(/*0*/ p0: kotlin.Int): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ element: kotlin.String): kotlin.Int + public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ element: kotlin.String!): kotlin.Int public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.collections.MutableIterator - public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ element: kotlin.String): kotlin.Int + public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ element: kotlin.String!): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.collections.MutableListIterator public open override /*1*/ /*fake_override*/ fun listIterator(/*0*/ index: kotlin.Int): kotlin.collections.MutableListIterator invisible_fake open override /*1*/ /*fake_override*/ fun outOfBoundsMsg(/*0*/ p0: kotlin.Int): kotlin.String! invisible_fake open override /*1*/ /*fake_override*/ fun rangeCheck(/*0*/ p0: kotlin.Int): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun rangeCheckForAdd(/*0*/ p0: kotlin.Int): kotlin.Unit invisible_fake open override /*1*/ /*fake_override*/ fun readObject(/*0*/ p0: java.io.ObjectInputStream!): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun remove(/*0*/ element: kotlin.String): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun removeAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun remove(/*0*/ element: kotlin.String!): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun removeAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun removeAt(/*0*/ p0: kotlin.Int): kotlin.String protected/*protected and package*/ open override /*1*/ /*fake_override*/ fun removeRange(/*0*/ p0: kotlin.Int, /*1*/ p1: kotlin.Int): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun retainAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun retainAll(/*0*/ elements: kotlin.collections.Collection): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun set(/*0*/ index: kotlin.Int, /*1*/ element: kotlin.String): kotlin.String public open override /*1*/ /*fake_override*/ fun subList(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.collections.MutableList public open override /*1*/ /*fake_override*/ fun toArray(): kotlin.Array<(out) kotlin.Any!>! diff --git a/compiler/testData/loadJava8/compiledJava/MapRemove.txt b/compiler/testData/loadJava8/compiledJava/MapRemove.txt index 6e40bf72fba..0d647dde632 100644 --- a/compiler/testData/loadJava8/compiledJava/MapRemove.txt +++ b/compiler/testData/loadJava8/compiledJava/MapRemove.txt @@ -12,14 +12,14 @@ public open class MapRemove { public abstract override /*1*/ /*fake_override*/ fun clear(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun compute(/*0*/ p0: K!, /*1*/ p1: java.util.function.BiFunction): V? public open override /*1*/ /*fake_override*/ fun computeIfAbsent(/*0*/ p0: K!, /*1*/ p1: java.util.function.Function): V! - public open override /*1*/ /*fake_override*/ fun computeIfPresent(/*0*/ p0: K!, /*1*/ p1: java.util.function.BiFunction): V? + public open override /*1*/ /*fake_override*/ fun computeIfPresent(/*0*/ p0: K!, /*1*/ p1: java.util.function.BiFunction): V? public abstract override /*1*/ /*fake_override*/ fun containsKey(/*0*/ key: K!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun containsValue(/*0*/ value: V!): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun forEach(/*0*/ p0: java.util.function.BiConsumer): kotlin.Unit public abstract override /*1*/ /*fake_override*/ fun get(/*0*/ key: K!): V? @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.PlatformDependent public open override /*1*/ /*fake_override*/ fun getOrDefault(/*0*/ key: K!, /*1*/ defaultValue: V!): V! public abstract override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun merge(/*0*/ p0: K!, /*1*/ p1: V, /*2*/ p2: java.util.function.BiFunction): V? + public open override /*1*/ /*fake_override*/ fun merge(/*0*/ p0: K!, /*1*/ p1: V & Any, /*2*/ p2: java.util.function.BiFunction): V? public abstract override /*1*/ /*fake_override*/ fun put(/*0*/ key: K!, /*1*/ value: V!): V? public abstract override /*1*/ /*fake_override*/ fun putAll(/*0*/ from: kotlin.collections.Map): kotlin.Unit public open override /*1*/ /*fake_override*/ fun putIfAbsent(/*0*/ p0: K!, /*1*/ p1: V!): V? diff --git a/compiler/testData/loadJava8/compiledJava/typeParameterAnnotations/Basic.txt b/compiler/testData/loadJava8/compiledJava/typeParameterAnnotations/Basic.txt index e87f9491336..835dab7c51d 100644 --- a/compiler/testData/loadJava8/compiledJava/typeParameterAnnotations/Basic.txt +++ b/compiler/testData/loadJava8/compiledJava/typeParameterAnnotations/Basic.txt @@ -2,7 +2,7 @@ package test public open class Basic { public constructor Basic() - public/*package*/ open fun foo(/*0*/ p0: R!): kotlin.Unit + public/*package*/ open fun foo(/*0*/ p0: R!): kotlin.Unit public interface G { public abstract fun foo(/*0*/ p0: R): kotlin.Unit diff --git a/compiler/testData/loadJava8/compiledJava/typeUseAnnotations/BaseClassTypeArguments.txt b/compiler/testData/loadJava8/compiledJava/typeUseAnnotations/BaseClassTypeArguments.txt index 051cdf9883b..a479ecfc05b 100644 --- a/compiler/testData/loadJava8/compiledJava/typeUseAnnotations/BaseClassTypeArguments.txt +++ b/compiler/testData/loadJava8/compiledJava/typeUseAnnotations/BaseClassTypeArguments.txt @@ -12,10 +12,10 @@ public/*package*/ open class A3() } -public open class BaseClassTypeArguments : test.A3!>!>!>!>!, test.I1..@org.jetbrains.annotations.NotNull kotlin.Array)>!>!, test.A2!>!>!>, test.I1<(@org.jetbrains.annotations.NotNull kotlin.Array!>!>..@org.jetbrains.annotations.NotNull kotlin.Array!>!>)>, test.I2<@org.jetbrains.annotations.NotNull B, B!>, test.I3!>!>!>!>!, B!, @org.jetbrains.annotations.NotNull B> { +public open class BaseClassTypeArguments : test.A3!>!>!>!>!, test.I1..@org.jetbrains.annotations.NotNull kotlin.Array)>!>!, test.A2!>!>!>, test.I1<(@org.jetbrains.annotations.NotNull kotlin.Array!>!>..@org.jetbrains.annotations.NotNull kotlin.Array!>!>)>, test.I2<@org.jetbrains.annotations.NotNull B & Any, B!>, test.I3!>!>!>!>!, B!, @org.jetbrains.annotations.NotNull B & Any> { public constructor BaseClassTypeArguments() - public/*package*/ open class BaseClassTypeArguments2 : test.A3!>!>!>!>!, test.I1..@org.jetbrains.annotations.NotNull kotlin.Array)>!>!, test.A2!>!>!> { + public/*package*/ open class BaseClassTypeArguments2 : test.A3!>!>!>!>!, test.I1..@org.jetbrains.annotations.NotNull kotlin.Array)>!>!, test.A2!>!>!> { public/*package*/ constructor BaseClassTypeArguments2() } @@ -27,10 +27,10 @@ public open class BaseClassTypeArguments : test.A3 /*captured type parameters: /*1*/ B : kotlin.Any!*/ : test.I1!>!>..@org.jetbrains.annotations.NotNull kotlin.Array!>!>)>!, test.I1!>!>!>, test.I2<@org.jetbrains.annotations.NotNull B, B!>, test.I3!>!>!>!>!, test.I1..@org.jetbrains.annotations.NotNull kotlin.Array)>!>!, test.I2!>!>!> { + public/*package*/ open inner class ImplementedInterfacesTypeArguments /*captured type parameters: /*1*/ B : kotlin.Any!*/ : test.I1!>!>..@org.jetbrains.annotations.NotNull kotlin.Array!>!>)>!, test.I1!>!>!>, test.I2<@org.jetbrains.annotations.NotNull B & Any, B!>, test.I3!>!>!>!>!, test.I1..@org.jetbrains.annotations.NotNull kotlin.Array)>!>!, test.I2!>!>!> { public/*package*/ constructor ImplementedInterfacesTypeArguments() - public open inner class BaseClassTypeArguments1 /*captured type parameters: /*1*/ B : kotlin.Any!, /*2*/ B : kotlin.Any!*/ : test.A3!>!>!>!>!, test.I1..@org.jetbrains.annotations.NotNull kotlin.Array)>!>!, test.A2!>!>!> { + public open inner class BaseClassTypeArguments1 /*captured type parameters: /*1*/ B : kotlin.Any!, /*2*/ B : kotlin.Any!*/ : test.A3!>!>!>!>!, test.I1..@org.jetbrains.annotations.NotNull kotlin.Array)>!>!, test.A2!>!>!> { public constructor BaseClassTypeArguments1() } } diff --git a/compiler/testData/loadJava8/compiledJava/typeUseAnnotations/Basic.txt b/compiler/testData/loadJava8/compiledJava/typeUseAnnotations/Basic.txt index 7ac5bd3fe4d..29b186352a8 100644 --- a/compiler/testData/loadJava8/compiledJava/typeUseAnnotations/Basic.txt +++ b/compiler/testData/loadJava8/compiledJava/typeUseAnnotations/Basic.txt @@ -3,7 +3,7 @@ package test public open class Basic { public constructor Basic() - public/*package*/ interface G : test.Basic.G2<@org.jetbrains.annotations.NotNull T, @org.jetbrains.annotations.NotNull kotlin.String> { + public/*package*/ interface G : test.Basic.G2<@org.jetbrains.annotations.NotNull T & Any, @org.jetbrains.annotations.NotNull kotlin.String> { } public/*package*/ interface G2 { diff --git a/compiler/testData/loadJava8/compiledJava/typeUseAnnotations/Basic_DisabledImprovements.txt b/compiler/testData/loadJava8/compiledJava/typeUseAnnotations/Basic_DisabledImprovements.txt index f75974d7c03..874fe5f394e 100644 --- a/compiler/testData/loadJava8/compiledJava/typeUseAnnotations/Basic_DisabledImprovements.txt +++ b/compiler/testData/loadJava8/compiledJava/typeUseAnnotations/Basic_DisabledImprovements.txt @@ -21,7 +21,7 @@ public open class Basic_DisabledImprovements!): kotlin.Unit public abstract fun !>!> f10(/*0*/ p0: T!): kotlin.Unit public abstract fun f2(): test.Basic_DisabledImprovements.G2<@org.jetbrains.annotations.Nullable kotlin.String!, @org.jetbrains.annotations.NotNull kotlin.Int!>! - public abstract fun f3(/*0*/ @org.jetbrains.annotations.NotNull p0: @org.jetbrains.annotations.NotNull T): kotlin.Unit + public abstract fun f3(/*0*/ @org.jetbrains.annotations.NotNull p0: @org.jetbrains.annotations.NotNull T & Any): kotlin.Unit public abstract fun f4(/*0*/ p0: test.Basic_DisabledImprovements.G<(@org.jetbrains.annotations.Nullable kotlin.Array<@org.jetbrains.annotations.NotNull kotlin.String!>..@org.jetbrains.annotations.Nullable kotlin.Array?)>!): kotlin.Unit public abstract fun f5(/*0*/ p0: test.Basic_DisabledImprovements.G<*>!): kotlin.Unit public abstract fun f6(/*0*/ p0: test.Basic_DisabledImprovements.G!): kotlin.Unit diff --git a/compiler/testData/loadJava8/compiledJava/typeUseAnnotations/ClassTypeParameterBounds.txt b/compiler/testData/loadJava8/compiledJava/typeUseAnnotations/ClassTypeParameterBounds.txt index e6e83f7aa75..24c0214dfc8 100644 --- a/compiler/testData/loadJava8/compiledJava/typeUseAnnotations/ClassTypeParameterBounds.txt +++ b/compiler/testData/loadJava8/compiledJava/typeUseAnnotations/ClassTypeParameterBounds.txt @@ -22,15 +22,15 @@ public open class ClassTypeParameterBounds { public/*package*/ interface G3 where B : @org.jetbrains.annotations.NotNull test.ClassTypeParameterBounds.I1 { } - public/*package*/ open inner class G4 { - public/*package*/ constructor G4() + public/*package*/ open inner class G4 { + public/*package*/ constructor G4() } public/*package*/ interface G5 { } - public/*package*/ open inner class G6 { - public/*package*/ constructor G6() + public/*package*/ open inner class G6 { + public/*package*/ constructor G6() } public/*package*/ interface G7 where _A : test.ClassTypeParameterBounds.I2<@org.jetbrains.annotations.NotNull kotlin.Int>!, _A : @org.jetbrains.annotations.NotNull test.ClassTypeParameterBounds.I3 { diff --git a/compiler/testData/loadJava8/compiledJava/typeUseAnnotations/MethodTypeParameterBounds.txt b/compiler/testData/loadJava8/compiledJava/typeUseAnnotations/MethodTypeParameterBounds.txt index 0f21e253c9b..25276820749 100644 --- a/compiler/testData/loadJava8/compiledJava/typeUseAnnotations/MethodTypeParameterBounds.txt +++ b/compiler/testData/loadJava8/compiledJava/typeUseAnnotations/MethodTypeParameterBounds.txt @@ -5,17 +5,17 @@ public/*package*/ abstract class MethodTypeParameterBounds { public/*package*/ open fun f1(/*0*/ p0: T): kotlin.Unit public/*package*/ open fun f10(/*0*/ p0: _A): kotlin.Unit where _A : test.MethodTypeParameterBounds.I2!, _A : @org.jetbrains.annotations.Nullable test.MethodTypeParameterBounds.I3? public/*package*/ open fun ..@org.jetbrains.annotations.NotNull kotlin.Array)>!> f11(/*0*/ p0: _A): kotlin.Unit where _A : test.MethodTypeParameterBounds.I2?..@org.jetbrains.annotations.Nullable kotlin.Array?)>!, _A : @org.jetbrains.annotations.Nullable test.MethodTypeParameterBounds.I3..@org.jetbrains.annotations.NotNull kotlin.Array)>? - public/*package*/ open fun !> f12(/*0*/ p0: _A): kotlin.Unit where _A : test.MethodTypeParameterBounds.I2!, _A : @org.jetbrains.annotations.NotNull test.MethodTypeParameterBounds.I3 + public/*package*/ open fun !> f12(/*0*/ p0: _A & Any): kotlin.Unit where _A : test.MethodTypeParameterBounds.I2!, _A : @org.jetbrains.annotations.NotNull test.MethodTypeParameterBounds.I3 public/*package*/ open fun ?..@org.jetbrains.annotations.Nullable kotlin.Array?)>!>!>!> f13(/*0*/ p0: _A): kotlin.Unit where _A : test.MethodTypeParameterBounds.I2!>!>!>?..@org.jetbrains.annotations.Nullable kotlin.Array!>!>!>?)>!, _A : @org.jetbrains.annotations.Nullable test.MethodTypeParameterBounds.I3?..@org.jetbrains.annotations.Nullable kotlin.Array?)>!>? public/*package*/ abstract fun ..@org.jetbrains.annotations.NotNull kotlin.Array)>!> f14(/*0*/ p0: _A): kotlin.Unit where _A : test.MethodTypeParameterBounds.I2!>!>!, _A : @org.jetbrains.annotations.Nullable test.MethodTypeParameterBounds.I3?..@org.jetbrains.annotations.Nullable kotlin.Array?)>!>? public/*package*/ open fun !> f15(/*0*/ p0: _A!): kotlin.Unit where B : @org.jetbrains.annotations.NotNull test.MethodTypeParameterBounds.I2<_A!> public/*package*/ open fun f2(/*0*/ p0: _A!, /*1*/ p1: B): kotlin.Unit public/*package*/ open fun f3(/*0*/ p0: _A!, /*1*/ p1: B): kotlin.Unit where B : @org.jetbrains.annotations.Nullable test.MethodTypeParameterBounds.I1? - public/*package*/ open fun f4(/*0*/ p0: _A, /*1*/ p1: B!): kotlin.Unit + public/*package*/ open fun f4(/*0*/ p0: _A, /*1*/ p1: B!): kotlin.Unit public/*package*/ open fun f5(/*0*/ p0: _A!, /*1*/ p1: B): kotlin.Unit public/*package*/ open fun f6(): kotlin.Unit - public/*package*/ abstract fun f7(/*0*/ p0: _A!, /*1*/ p1: B): kotlin.Unit - public/*package*/ abstract fun f8(/*0*/ p0: _A, /*1*/ p1: B!, /*2*/ p2: C!, /*3*/ p3: D, /*4*/ p4: E!, /*5*/ p5: F!): kotlin.Unit + public/*package*/ abstract fun f7(/*0*/ p0: _A!, /*1*/ p1: B): kotlin.Unit + public/*package*/ abstract fun f8(/*0*/ p0: _A, /*1*/ p1: B!, /*2*/ p2: C!, /*3*/ p3: D, /*4*/ p4: E!, /*5*/ p5: F!): kotlin.Unit public/*package*/ open fun f9(/*0*/ p0: _A): kotlin.Unit where _A : test.MethodTypeParameterBounds.I2<@org.jetbrains.annotations.Nullable kotlin.Int?>!, _A : @org.jetbrains.annotations.Nullable test.MethodTypeParameterBounds.I3? public/*package*/ interface I1 { diff --git a/compiler/testData/loadJava8/sourceJava/MapRemove.txt b/compiler/testData/loadJava8/sourceJava/MapRemove.txt index cdf26cd7418..f30fb25a4f2 100644 --- a/compiler/testData/loadJava8/sourceJava/MapRemove.txt +++ b/compiler/testData/loadJava8/sourceJava/MapRemove.txt @@ -12,14 +12,14 @@ public open class MapRemove { public abstract override /*1*/ /*fake_override*/ fun clear(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun compute(/*0*/ p0: K!, /*1*/ p1: java.util.function.BiFunction): V? public open override /*1*/ /*fake_override*/ fun computeIfAbsent(/*0*/ p0: K!, /*1*/ p1: java.util.function.Function): V! - public open override /*1*/ /*fake_override*/ fun computeIfPresent(/*0*/ p0: K!, /*1*/ p1: java.util.function.BiFunction): V? + public open override /*1*/ /*fake_override*/ fun computeIfPresent(/*0*/ p0: K!, /*1*/ p1: java.util.function.BiFunction): V? public abstract override /*1*/ /*fake_override*/ fun containsKey(/*0*/ key: K!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun containsValue(/*0*/ value: V!): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun forEach(/*0*/ p0: java.util.function.BiConsumer): kotlin.Unit public abstract override /*1*/ /*fake_override*/ fun get(/*0*/ key: K!): V? @kotlin.SinceKotlin(version = "1.1") @kotlin.internal.PlatformDependent public open override /*1*/ /*fake_override*/ fun getOrDefault(/*0*/ key: K!, /*1*/ defaultValue: V!): V! public abstract override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun merge(/*0*/ p0: K!, /*1*/ p1: V, /*2*/ p2: java.util.function.BiFunction): V? + public open override /*1*/ /*fake_override*/ fun merge(/*0*/ p0: K!, /*1*/ p1: V & Any, /*2*/ p2: java.util.function.BiFunction): V? public abstract override /*1*/ /*fake_override*/ fun put(/*0*/ key: K!, /*1*/ value: V!): V? public abstract override /*1*/ /*fake_override*/ fun putAll(/*0*/ from: kotlin.collections.Map): kotlin.Unit public open override /*1*/ /*fake_override*/ fun putIfAbsent(/*0*/ p0: K!, /*1*/ p1: V!): V? diff --git a/compiler/testData/loadJava8/sourceJava/typeParameterAnnotations/Basic.txt b/compiler/testData/loadJava8/sourceJava/typeParameterAnnotations/Basic.txt index 80bfb3d426f..6be6cc3fcd7 100644 --- a/compiler/testData/loadJava8/sourceJava/typeParameterAnnotations/Basic.txt +++ b/compiler/testData/loadJava8/sourceJava/typeParameterAnnotations/Basic.txt @@ -2,7 +2,7 @@ package test public open class Basic { public constructor Basic() - public/*package*/ open fun foo(/*0*/ r: R!): kotlin.Unit + public/*package*/ open fun foo(/*0*/ r: R!): kotlin.Unit public interface G { public abstract fun foo(/*0*/ r: R): kotlin.Unit diff --git a/compiler/testData/loadJava8/sourceJava/typeUseAnnotations/BaseClassTypeArguments.txt b/compiler/testData/loadJava8/sourceJava/typeUseAnnotations/BaseClassTypeArguments.txt index af219010b39..428a527ee47 100644 --- a/compiler/testData/loadJava8/sourceJava/typeUseAnnotations/BaseClassTypeArguments.txt +++ b/compiler/testData/loadJava8/sourceJava/typeUseAnnotations/BaseClassTypeArguments.txt @@ -1,9 +1,9 @@ package test -public open class BaseClassTypeArguments : test.A3!>!>!>!>!, test.I1..@org.jetbrains.annotations.NotNull kotlin.Array)>!>!, test.A2!>!>!>, test.I1<(@org.jetbrains.annotations.NotNull kotlin.Array!>!>..@org.jetbrains.annotations.NotNull kotlin.Array!>!>)>, test.I2<@org.jetbrains.annotations.NotNull B, B!>, test.I3!>!>!>!>!, B!, @org.jetbrains.annotations.NotNull B> { +public open class BaseClassTypeArguments : test.A3!>!>!>!>!, test.I1..@org.jetbrains.annotations.NotNull kotlin.Array)>!>!, test.A2!>!>!>, test.I1<(@org.jetbrains.annotations.NotNull kotlin.Array!>!>..@org.jetbrains.annotations.NotNull kotlin.Array!>!>)>, test.I2<@org.jetbrains.annotations.NotNull B & Any, B!>, test.I3!>!>!>!>!, B!, @org.jetbrains.annotations.NotNull B & Any> { public constructor BaseClassTypeArguments() - public/*package*/ open class BaseClassTypeArguments2 : test.A3!>!>!>!>!, test.I1..@org.jetbrains.annotations.NotNull kotlin.Array)>!>!, test.A2!>!>!> { + public/*package*/ open class BaseClassTypeArguments2 : test.A3!>!>!>!>!, test.I1..@org.jetbrains.annotations.NotNull kotlin.Array)>!>!, test.A2!>!>!> { public/*package*/ constructor BaseClassTypeArguments2() } @@ -15,10 +15,10 @@ public open class BaseClassTypeArguments : test.A3 /*captured type parameters: /*1*/ B : kotlin.Any!*/ : test.I1!>!>..@org.jetbrains.annotations.NotNull kotlin.Array!>!>)>!, test.I1!>!>!>, test.I2<@org.jetbrains.annotations.NotNull B, B!>, test.I3!>!>!>!>!, test.I1..@org.jetbrains.annotations.NotNull kotlin.Array)>!>!, test.I2!>!>!> { + public/*package*/ open inner class ImplementedInterfacesTypeArguments /*captured type parameters: /*1*/ B : kotlin.Any!*/ : test.I1!>!>..@org.jetbrains.annotations.NotNull kotlin.Array!>!>)>!, test.I1!>!>!>, test.I2<@org.jetbrains.annotations.NotNull B & Any, B!>, test.I3!>!>!>!>!, test.I1..@org.jetbrains.annotations.NotNull kotlin.Array)>!>!, test.I2!>!>!> { public/*package*/ constructor ImplementedInterfacesTypeArguments() - public open inner class BaseClassTypeArguments1 /*captured type parameters: /*1*/ B : kotlin.Any!, /*2*/ B : kotlin.Any!*/ : test.A3!>!>!>!>!, test.I1..@org.jetbrains.annotations.NotNull kotlin.Array)>!>!, test.A2!>!>!> { + public open inner class BaseClassTypeArguments1 /*captured type parameters: /*1*/ B : kotlin.Any!, /*2*/ B : kotlin.Any!*/ : test.A3!>!>!>!>!, test.I1..@org.jetbrains.annotations.NotNull kotlin.Array)>!>!, test.A2!>!>!> { public constructor BaseClassTypeArguments1() } } diff --git a/compiler/testData/loadJava8/sourceJava/typeUseAnnotations/Basic_DisabledImprovements.txt b/compiler/testData/loadJava8/sourceJava/typeUseAnnotations/Basic_DisabledImprovements.txt index 63bf24cbfcb..3e060121e6b 100644 --- a/compiler/testData/loadJava8/sourceJava/typeUseAnnotations/Basic_DisabledImprovements.txt +++ b/compiler/testData/loadJava8/sourceJava/typeUseAnnotations/Basic_DisabledImprovements.txt @@ -11,7 +11,7 @@ public open class Basic_DisabledImprovements : test.Basic_DisabledImprovements.G2<@org.jetbrains.annotations.NotNull T, @org.jetbrains.annotations.NotNull kotlin.String> { + public/*package*/ interface G : test.Basic_DisabledImprovements.G2<@org.jetbrains.annotations.NotNull T & Any, @org.jetbrains.annotations.NotNull kotlin.String> { } public/*package*/ interface G2 { @@ -21,7 +21,7 @@ public open class Basic_DisabledImprovements!): kotlin.Unit public abstract fun !>!> f10(/*0*/ p: T!): kotlin.Unit public abstract fun f2(): test.Basic_DisabledImprovements.G2<@org.jetbrains.annotations.Nullable kotlin.String?, @org.jetbrains.annotations.NotNull kotlin.Int>! - public abstract fun f3(/*0*/ @org.jetbrains.annotations.NotNull x: @org.jetbrains.annotations.NotNull T): kotlin.Unit + public abstract fun f3(/*0*/ @org.jetbrains.annotations.NotNull x: @org.jetbrains.annotations.NotNull T & Any): kotlin.Unit public abstract fun f4(/*0*/ p: test.Basic_DisabledImprovements.G<(@org.jetbrains.annotations.Nullable kotlin.Array<@org.jetbrains.annotations.NotNull kotlin.String!>..@org.jetbrains.annotations.Nullable kotlin.Array?)>!): kotlin.Unit public abstract fun f5(/*0*/ p: test.Basic_DisabledImprovements.G<*>!): kotlin.Unit public abstract fun f6(/*0*/ p: test.Basic_DisabledImprovements.G!): kotlin.Unit diff --git a/compiler/testData/loadJava8/sourceJava/typeUseAnnotations/ClassTypeParameterBounds.txt b/compiler/testData/loadJava8/sourceJava/typeUseAnnotations/ClassTypeParameterBounds.txt index e6e83f7aa75..24c0214dfc8 100644 --- a/compiler/testData/loadJava8/sourceJava/typeUseAnnotations/ClassTypeParameterBounds.txt +++ b/compiler/testData/loadJava8/sourceJava/typeUseAnnotations/ClassTypeParameterBounds.txt @@ -22,15 +22,15 @@ public open class ClassTypeParameterBounds { public/*package*/ interface G3 where B : @org.jetbrains.annotations.NotNull test.ClassTypeParameterBounds.I1 { } - public/*package*/ open inner class G4 { - public/*package*/ constructor G4() + public/*package*/ open inner class G4 { + public/*package*/ constructor G4() } public/*package*/ interface G5 { } - public/*package*/ open inner class G6 { - public/*package*/ constructor G6() + public/*package*/ open inner class G6 { + public/*package*/ constructor G6() } public/*package*/ interface G7 where _A : test.ClassTypeParameterBounds.I2<@org.jetbrains.annotations.NotNull kotlin.Int>!, _A : @org.jetbrains.annotations.NotNull test.ClassTypeParameterBounds.I3 { diff --git a/compiler/testData/loadJava8/sourceJava/typeUseAnnotations/MethodTypeParameterBounds.txt b/compiler/testData/loadJava8/sourceJava/typeUseAnnotations/MethodTypeParameterBounds.txt index c38c03b15b2..90e8a566c61 100644 --- a/compiler/testData/loadJava8/sourceJava/typeUseAnnotations/MethodTypeParameterBounds.txt +++ b/compiler/testData/loadJava8/sourceJava/typeUseAnnotations/MethodTypeParameterBounds.txt @@ -5,17 +5,17 @@ public/*package*/ abstract class MethodTypeParameterBounds { public/*package*/ open fun f1(/*0*/ x: T): kotlin.Unit public/*package*/ open fun f10(/*0*/ x: _A): kotlin.Unit where _A : test.MethodTypeParameterBounds.I2!, _A : @org.jetbrains.annotations.Nullable test.MethodTypeParameterBounds.I3? public/*package*/ open fun ..@org.jetbrains.annotations.NotNull kotlin.Array)>!> f11(/*0*/ x: _A): kotlin.Unit where _A : test.MethodTypeParameterBounds.I2?..@org.jetbrains.annotations.Nullable kotlin.Array?)>!, _A : @org.jetbrains.annotations.Nullable test.MethodTypeParameterBounds.I3..@org.jetbrains.annotations.NotNull kotlin.Array)>? - public/*package*/ open fun !> f12(/*0*/ x: _A): kotlin.Unit where _A : test.MethodTypeParameterBounds.I2!, _A : @org.jetbrains.annotations.NotNull test.MethodTypeParameterBounds.I3 + public/*package*/ open fun !> f12(/*0*/ x: _A & Any): kotlin.Unit where _A : test.MethodTypeParameterBounds.I2!, _A : @org.jetbrains.annotations.NotNull test.MethodTypeParameterBounds.I3 public/*package*/ open fun ?..@org.jetbrains.annotations.Nullable kotlin.Array?)>!>!>!> f13(/*0*/ x: _A): kotlin.Unit where _A : test.MethodTypeParameterBounds.I2!>!>!>?..@org.jetbrains.annotations.Nullable kotlin.Array!>!>!>?)>!, _A : @org.jetbrains.annotations.Nullable test.MethodTypeParameterBounds.I3?..@org.jetbrains.annotations.Nullable kotlin.Array?)>!>? public/*package*/ abstract fun ..@org.jetbrains.annotations.NotNull kotlin.Array)>!> f14(/*0*/ x: _A): kotlin.Unit where _A : test.MethodTypeParameterBounds.I2!>!>!, _A : @org.jetbrains.annotations.Nullable test.MethodTypeParameterBounds.I3?..@org.jetbrains.annotations.Nullable kotlin.Array?)>!>? public/*package*/ open fun !> f15(/*0*/ x: _A!): kotlin.Unit where B : @org.jetbrains.annotations.NotNull test.MethodTypeParameterBounds.I2<_A!> public/*package*/ open fun f2(/*0*/ x: _A!, /*1*/ y: B): kotlin.Unit public/*package*/ open fun f3(/*0*/ x: _A!, /*1*/ y: B): kotlin.Unit where B : @org.jetbrains.annotations.Nullable test.MethodTypeParameterBounds.I1? - public/*package*/ open fun f4(/*0*/ x: _A, /*1*/ y: B!): kotlin.Unit + public/*package*/ open fun f4(/*0*/ x: _A, /*1*/ y: B!): kotlin.Unit public/*package*/ open fun f5(/*0*/ x: _A!, /*1*/ y: B): kotlin.Unit public/*package*/ open fun f6(): kotlin.Unit - public/*package*/ abstract fun f7(/*0*/ x: _A!, /*1*/ y: B): kotlin.Unit - public/*package*/ abstract fun f8(/*0*/ x1: _A, /*1*/ x2: B!, /*2*/ x3: C!, /*3*/ x4: D, /*4*/ x5: E!, /*5*/ x6: F!): kotlin.Unit + public/*package*/ abstract fun f7(/*0*/ x: _A!, /*1*/ y: B): kotlin.Unit + public/*package*/ abstract fun f8(/*0*/ x1: _A, /*1*/ x2: B!, /*2*/ x3: C!, /*3*/ x4: D, /*4*/ x5: E!, /*5*/ x6: F!): kotlin.Unit public/*package*/ open fun f9(/*0*/ x: _A): kotlin.Unit where _A : test.MethodTypeParameterBounds.I2<@org.jetbrains.annotations.Nullable kotlin.Int?>!, _A : @org.jetbrains.annotations.Nullable test.MethodTypeParameterBounds.I3? public/*package*/ interface I1 { diff --git a/compiler/testData/resolvedCalls/enhancedSignatures/map/mapComputeIfPresent.txt b/compiler/testData/resolvedCalls/enhancedSignatures/map/mapComputeIfPresent.txt index 559df722a1e..5414d7a9bd8 100644 --- a/compiler/testData/resolvedCalls/enhancedSignatures/map/mapComputeIfPresent.txt +++ b/compiler/testData/resolvedCalls/enhancedSignatures/map/mapComputeIfPresent.txt @@ -1,34 +1,34 @@ fun valuesNotNull(map: MutableMap) { map.computeIfPresent(1) { k, v -> v.length.toString() ?: null } // SUCCESS - // ORIGINAL: fun computeIfPresent(K, BiFunction): V? defined in kotlin.collections.MutableMap + // ORIGINAL: fun computeIfPresent(K, BiFunction): V? defined in kotlin.collections.MutableMap // SUBSTITUTED: fun computeIfPresent(Int, BiFunction): String? defined in kotlin.collections.MutableMap } fun valuesNullable(map: MutableMap) { map.computeIfPresent(1) { k, v -> v?.length?.toString() } // SUCCESS - // ORIGINAL: fun computeIfPresent(K, BiFunction): V? defined in kotlin.collections.MutableMap + // ORIGINAL: fun computeIfPresent(K, BiFunction): V? defined in kotlin.collections.MutableMap // SUBSTITUTED: fun computeIfPresent(Int, BiFunction): String? defined in kotlin.collections.MutableMap } fun valuesT(map: MutableMap, newValue: T) { map.computeIfPresent(1) { k, v -> v?.length.toString() ?: null } // SUCCESS - // ORIGINAL: fun computeIfPresent(K, BiFunction): V? defined in kotlin.collections.MutableMap - // SUBSTITUTED: fun computeIfPresent(Int, BiFunction): T? defined in kotlin.collections.MutableMap + // ORIGINAL: fun computeIfPresent(K, BiFunction): V? defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun computeIfPresent(Int, BiFunction): T? defined in kotlin.collections.MutableMap } fun valuesTNotNull(map: MutableMap, newValue: T) { map.computeIfPresent(1) { k, v -> null } // SUCCESS - // ORIGINAL: fun computeIfPresent(K, BiFunction): V? defined in kotlin.collections.MutableMap + // ORIGINAL: fun computeIfPresent(K, BiFunction): V? defined in kotlin.collections.MutableMap // SUBSTITUTED: fun computeIfPresent(Int, BiFunction): T? defined in kotlin.collections.MutableMap } fun valuesTNullable(map: MutableMap, newValue: T?) { map.computeIfPresent(1) { k, v -> null } // SUCCESS - // ORIGINAL: fun computeIfPresent(K, BiFunction): V? defined in kotlin.collections.MutableMap - // SUBSTITUTED: fun computeIfPresent(Int, BiFunction): T? defined in kotlin.collections.MutableMap + // ORIGINAL: fun computeIfPresent(K, BiFunction): V? defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun computeIfPresent(Int, BiFunction): T? defined in kotlin.collections.MutableMap } diff --git a/compiler/testData/resolvedCalls/enhancedSignatures/map/mapMerge.txt b/compiler/testData/resolvedCalls/enhancedSignatures/map/mapMerge.txt index 48dac6e4303..a9df1466e2d 100644 --- a/compiler/testData/resolvedCalls/enhancedSignatures/map/mapMerge.txt +++ b/compiler/testData/resolvedCalls/enhancedSignatures/map/mapMerge.txt @@ -1,42 +1,42 @@ fun valuesNotNull(map: MutableMap) { map.merge(1, "x") { old, new -> old + new } // SUCCESS - // ORIGINAL: fun merge(K, V, BiFunction): V? defined in kotlin.collections.MutableMap + // ORIGINAL: fun merge(K, V & Any, BiFunction): V? defined in kotlin.collections.MutableMap // SUBSTITUTED: fun merge(Int, String, BiFunction): String? defined in kotlin.collections.MutableMap } fun valuesNullable(map: MutableMap) { map.merge(1, "x") { old, new -> old + new } // SUCCESS - // ORIGINAL: fun merge(K, V, BiFunction): V? defined in kotlin.collections.MutableMap + // ORIGINAL: fun merge(K, V & Any, BiFunction): V? defined in kotlin.collections.MutableMap // SUBSTITUTED: fun merge(Int, String, BiFunction): String? defined in kotlin.collections.MutableMap map.merge(1, null) { old, new -> old + new } // UNSAFE_CALL_ERROR - // ORIGINAL: fun merge(K, V, BiFunction): V? defined in kotlin.collections.MutableMap + // ORIGINAL: fun merge(K, V & Any, BiFunction): V? defined in kotlin.collections.MutableMap // SUBSTITUTED: fun merge(Int, String, BiFunction): String? defined in kotlin.collections.MutableMap } fun valuesT(map: MutableMap, newValue: T) { map.merge(1, newValue) { old, new -> null } - // SUCCESS - // ORIGINAL: fun merge(K, V, BiFunction): V? defined in kotlin.collections.MutableMap - // SUBSTITUTED: fun merge(Int, T, BiFunction): T? defined in kotlin.collections.MutableMap + // OTHER_ERROR + // ORIGINAL: fun merge(K, V & Any, BiFunction): V? defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun merge(Int, T & Any, BiFunction): T? defined in kotlin.collections.MutableMap } fun valuesTNotNull(map: MutableMap, newValue: T) { map.merge(1, newValue) { old, new -> null } // SUCCESS - // ORIGINAL: fun merge(K, V, BiFunction): V? defined in kotlin.collections.MutableMap + // ORIGINAL: fun merge(K, V & Any, BiFunction): V? defined in kotlin.collections.MutableMap // SUBSTITUTED: fun merge(Int, T, BiFunction): T? defined in kotlin.collections.MutableMap } fun valuesTNullable(map: MutableMap, newValue: T?) { map.merge(1, newValue) { old, new -> new } // UNSAFE_CALL_ERROR - // ORIGINAL: fun merge(K, V, BiFunction): V? defined in kotlin.collections.MutableMap - // SUBSTITUTED: fun merge(Int, T, BiFunction): T? defined in kotlin.collections.MutableMap + // ORIGINAL: fun merge(K, V & Any, BiFunction): V? defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun merge(Int, T & Any, BiFunction): T? defined in kotlin.collections.MutableMap map.merge(1, newValue!!) { old, new -> new } // SUCCESS - // ORIGINAL: fun merge(K, V, BiFunction): V? defined in kotlin.collections.MutableMap - // SUBSTITUTED: fun merge(Int, T, BiFunction): T? defined in kotlin.collections.MutableMap + // ORIGINAL: fun merge(K, V & Any, BiFunction): V? defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun merge(Int, T & Any, BiFunction): T? defined in kotlin.collections.MutableMap } diff --git a/compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalEmpty.txt b/compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalEmpty.txt index c5e296cb349..4e9621d537f 100644 --- a/compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalEmpty.txt +++ b/compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalEmpty.txt @@ -3,11 +3,11 @@ import java.util.* fun use() { Optional.empty() // SUCCESS - // ORIGINAL: fun empty(): Optional defined in java.util.Optional + // ORIGINAL: fun empty(): Optional defined in java.util.Optional // SUBSTITUTED: fun empty(): Optional defined in java.util.Optional Optional.empty() // SUCCESS - // ORIGINAL: fun empty(): Optional defined in java.util.Optional + // ORIGINAL: fun empty(): Optional defined in java.util.Optional // SUBSTITUTED: fun empty(): Optional defined in java.util.Optional } diff --git a/compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalGet.txt b/compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalGet.txt index e65b4465711..f4d248535f4 100644 --- a/compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalGet.txt +++ b/compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalGet.txt @@ -3,14 +3,14 @@ import java.util.* fun use(v: Optional) { v.get() // SUCCESS - // ORIGINAL: fun get(): T defined in java.util.Optional + // ORIGINAL: fun get(): T & Any defined in java.util.Optional // SUBSTITUTED: fun get(): String defined in java.util.Optional } fun use2(v: Optional) { v.get() // SUCCESS - // ORIGINAL: fun get(): T defined in java.util.Optional + // ORIGINAL: fun get(): T & Any defined in java.util.Optional // SUBSTITUTED: fun get(): String defined in java.util.Optional } diff --git a/compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalIfPresent.txt b/compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalIfPresent.txt index 96043a2e2ba..b4b22694421 100644 --- a/compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalIfPresent.txt +++ b/compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalIfPresent.txt @@ -3,14 +3,14 @@ import java.util.* fun use(v: Optional) { v.ifPresent { value -> } // SUCCESS - // ORIGINAL: fun ifPresent(Consumer): Unit defined in java.util.Optional + // ORIGINAL: fun ifPresent(Consumer): Unit defined in java.util.Optional // SUBSTITUTED: fun ifPresent(Consumer): Unit defined in java.util.Optional } fun use2(v: Optional) { v.ifPresent { value -> } // SUCCESS - // ORIGINAL: fun ifPresent(Consumer): Unit defined in java.util.Optional + // ORIGINAL: fun ifPresent(Consumer): Unit defined in java.util.Optional // SUBSTITUTED: fun ifPresent(Consumer): Unit defined in java.util.Optional } diff --git a/compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalOf.txt b/compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalOf.txt index 7638f81b666..41b4a5a6fc9 100644 --- a/compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalOf.txt +++ b/compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalOf.txt @@ -3,17 +3,17 @@ import java.util.* fun use() { val x: String? = "x" Optional.of(x) - // UNSAFE_CALL_ERROR - // ORIGINAL: fun of(T): Optional defined in java.util.Optional + // SUCCESS + // ORIGINAL: fun of(T & Any): Optional defined in java.util.Optional // SUBSTITUTED: fun of(String): Optional defined in java.util.Optional Optional.of(x!!) // SUCCESS - // ORIGINAL: fun of(T): Optional defined in java.util.Optional + // ORIGINAL: fun of(T & Any): Optional defined in java.util.Optional // SUBSTITUTED: fun of(String): Optional defined in java.util.Optional Optional.ofNullable(x) // SUCCESS - // ORIGINAL: fun ofNullable(T?): Optional defined in java.util.Optional + // ORIGINAL: fun ofNullable(T?): Optional defined in java.util.Optional // SUBSTITUTED: fun ofNullable(String?): Optional defined in java.util.Optional } diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.1.fir.kt index caa230188d6..5a3abc0ea1a 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.1.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.1.fir.kt @@ -29,7 +29,7 @@ fun case_3(value_1: Boolean?): Int = when(value_1) { } // TESTCASE NUMBER: 4 fun case_4(value_1: Boolean?): String = when (value_1) { - true && false && ((true || false)) || true && !!!false && !!!true -> "" - true && false && ((true || false)) || true && !!!false -> "" + true && false && ((true || false)) || true && !!!false && !!!true -> "" + true && false && ((true || false)) || true && !!!false -> "" null -> "" } diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.1.kt index a06dfaa8cec..855efc91253 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/11.1.kt @@ -29,7 +29,7 @@ fun case_3(value_1: Boolean?): Int = when // TESTCASE NUMBER: 4 fun case_4(value_1: Boolean?): String = when (value_1) { - true && false && ((true || false)) || true && !!!false && !!!true -> "" - true && false && ((true || false)) || true && !!!false -> "" + true && false && ((true || false)) || true && !!!false && !!!true -> "" + true && false && ((true || false)) || true && !!!false -> "" null -> "" } diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/3.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/3.1.fir.kt index da8b37dc92a..4cf7836bda8 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/3.1.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/3.1.fir.kt @@ -48,6 +48,6 @@ fun case_5(value_1: Boolean): String { // TESTCASE NUMBER: 6 fun case_6(value_1: Boolean): String = when (value_1) { - true && false && ((true || false)) || true && !!!false && !!!true -> "" - true && false && ((true || false)) || true && !!!false -> "" + true && false && ((true || false)) || true && !!!false && !!!true -> "" + true && false && ((true || false)) || true && !!!false -> "" } diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/3.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/3.1.kt index ef5984f4f45..b8c1caf077c 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/3.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/3.1.kt @@ -48,6 +48,6 @@ fun case_5(value_1: Boolean): String { // TESTCASE NUMBER: 6 fun case_6(value_1: Boolean): String = when (value_1) { - true && false && ((true || false)) || true && !!!false && !!!true -> "" - true && false && ((true || false)) || true && !!!false -> "" + true && false && ((true || false)) || true && !!!false && !!!true -> "" + true && false && ((true || false)) || true && !!!false -> "" } diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.1.fir.kt index f3cb6e14bf6..d3199791b40 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.1.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.1.fir.kt @@ -16,9 +16,3 @@ fun case_1(value_1: Boolean?): String = when (value_1) { null -> "" } -// TESTCASE NUMBER: 2 -fun case_2(value_1: Boolean?): String = when (value_1) { - true && false && ((true || false)) || true && !!!false && !!!true -> "" - true && false && ((true || false)) || true && !!!false -> "" - null -> "" -} diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.1.kt index 6ef4fbbff75..a4a043260b4 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.1.kt @@ -17,9 +17,3 @@ fun case_1(value_1: Boolean?): String = when (value_1) { null -> "" } -// TESTCASE NUMBER: 2 -fun case_2(value_1: Boolean?): String = when (value_1) { - true && false && ((true || false)) || true && !!!false && !!!true -> "" - true && false && ((true || false)) || true && !!!false -> "" - null -> "" -} diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/3.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/3.1.fir.kt index e4b8cc48a35..2d04aa7ff2a 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/3.1.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/3.1.fir.kt @@ -15,8 +15,3 @@ fun case_1(value_1: Boolean): String = when (value_1) { false -> "" } -// TESTCASE NUMBER: 2 -fun case_2(value_1: Boolean): String = when (value_1) { - true && false && ((true || false)) || true && !!!false && !!!true -> "" - true && false && ((true || false)) || true && !!!false -> "" -} diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/3.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/3.1.kt index 55fe89eb7e6..3e4cda55e96 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/3.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/3.1.kt @@ -16,8 +16,3 @@ fun case_1(value_1: Boolean): String = when (value_1) { false -> "" } -// TESTCASE NUMBER: 2 -fun case_2(value_1: Boolean): String = when (value_1) { - true && false && ((true || false)) || true && !!!false && !!!true -> "" - true && false && ((true || false)) || true && !!!false -> "" -} diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/testsMap.json b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/testsMap.json index ca33d50a5c2..b77d7f8bf4f 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/testsMap.json +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/testsMap.json @@ -439,7 +439,7 @@ }, { "specVersion": "0.1-435", - "casesNumber": 2, + "casesNumber": 1, "description": "Exhaustive when using nullable boolean values.", "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/11.1.kt", "unexpectedBehaviour": false, @@ -524,7 +524,7 @@ "3": [ { "specVersion": "0.1-100", - "casesNumber": 2, + "casesNumber": 1, "description": "Exhaustive when using boolean values.", "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/3.1.kt", "unexpectedBehaviour": false, diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/neg/1.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/neg/1.1.fir.kt new file mode 100644 index 00000000000..838fb981492 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/neg/1.1.fir.kt @@ -0,0 +1,35 @@ +// !DIAGNOSTICS: -UNUSED_EXPRESSION +// SKIP_TXT + +// TESTCASE NUMBER: 5 +fun case_5(value_1: Int, value_2: Int, value_3: Boolean?) { + when (value_1) { + 1 -> when (value_3) { + value_2 > 1000 -> "1" + value_2 > 100 -> "2" + else -> "3" + } + 2 -> when (value_3) { + value_2 > 1000 -> "1" + value_2 > 100 -> "2" + else -> "" + } + 3 -> when (value_3) { + else -> "" + } + 4 -> when (value_3) { + true -> "1" + false -> "2" + null -> "3" + else -> "" + } + 5 -> when (value_3) { + true -> "1" + false -> "2" + else -> "" + } + 6 -> when (value_3) { + else -> "" + } + } +} diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/neg/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/neg/1.1.kt new file mode 100644 index 00000000000..0c48b5d30ef --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/neg/1.1.kt @@ -0,0 +1,45 @@ +// !DIAGNOSTICS: -UNUSED_EXPRESSION +// SKIP_TXT + +/* + * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) + * + * SPEC VERSION: 0.1-313 + * MAIN LINK: expressions, when-expression -> paragraph 5 -> sentence 1 + * NUMBER: 1 + * DESCRIPTION: 'When' with bound value and with different variants of expressions in the control structure body. + * HELPERS: typesProvider, classes, functions + */ + +// TESTCASE NUMBER: 5 +fun case_5(value_1: Int, value_2: Int, value_3: Boolean?) { + when (value_1) { + 1 -> when (value_3) { + value_2 > 1000 -> "1" + value_2 > 100 -> "2" + else -> "3" + } + 2 -> when (value_3) { + value_2 > 1000 -> "1" + value_2 > 100 -> "2" + else -> "" + } + 3 -> when (value_3) { + else -> "" + } + 4 -> when (value_3) { + true -> "1" + false -> "2" + null -> "3" + else -> "" + } + 5 -> when (value_3) { + true -> "1" + false -> "2" + else -> "" + } + 6 -> when (value_3) { + else -> "" + } + } +} 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 1d92f1e185b..74e3561d2a6 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 @@ -46,16 +46,8 @@ fun case_4(value_1: Int, value_2: String, value_3: String) { // TESTCASE NUMBER: 5 fun case_5(value_1: Int, value_2: Int, value_3: Boolean?) { when (value_1) { - 1 -> when (value_3) { - value_2 > 1000 -> "1" - value_2 > 100 -> "2" - else -> "3" - } - 2 -> when (value_3) { - value_2 > 1000 -> "1" - value_2 > 100 -> "2" - else -> "" - } + 1 -> "3" + 2 -> "" 3 -> when (value_3) { else -> "" } @@ -78,11 +70,7 @@ fun case_5(value_1: Int, value_2: Int, value_3: Boolean?) { // TESTCASE NUMBER: 6 fun case_6(value_1: Int, value_2: Int, value_3: Boolean?) = when (value_1) { - 1 -> when (value_3) { - value_2 > 1000 -> 1 - value_2 > 100 -> 2 - else -> 3 - } + 1 -> 3 else -> when (value_3) { true -> 1 false -> 2 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 18e62787c4e..ff154735a21 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 @@ -55,16 +55,12 @@ fun case_4(value_1: Int, value_2: String, value_3: String) { } // TESTCASE NUMBER: 5 -fun case_5(value_1: Int, value_2: Int, value_3: Boolean?) { +fun case_5(value_1: Int, value_2: Int, value_3: Boolean?) { when (value_1) { 1 -> when (value_3) { - value_2 > 1000 -> "1" - value_2 > 100 -> "2" else -> "3" } 2 -> when (value_3) { - value_2 > 1000 -> "1" - value_2 > 100 -> "2" else -> "" } 3 -> when (value_3) { @@ -87,10 +83,8 @@ fun case_5(value_1: Int, value_2: Int, value_3: Boolean?) { } // TESTCASE NUMBER: 6 -fun case_6(value_1: Int, value_2: Int, value_3: Boolean?) = when (value_1) { +fun case_6(value_1: Int, value_2: Int, value_3: Boolean?) = when (value_1) { 1 -> when (value_3) { - value_2 > 1000 -> 1 - value_2 > 100 -> 2 else -> 3 } else -> when (value_3) { diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/5.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/5.1.fir.kt new file mode 100644 index 00000000000..df41b84a999 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/5.1.fir.kt @@ -0,0 +1,13 @@ +// SKIP_TXT + +// TESTCASE NUMBER: 3 +fun case_3(value_1: Boolean, value_2: Boolean, value_3: Long) { + 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/neg/5.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/5.1.kt new file mode 100644 index 00000000000..09bb012aaf9 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/5.1.kt @@ -0,0 +1,23 @@ +// SKIP_TXT + +/* + * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) + * + * SPEC VERSION: 0.1-435 + * MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 5 + * NUMBER: 1 + * DESCRIPTION: 'When' with enumeration of the different variants of expressions in 'when condition'. + * HELPERS: typesProvider, classes, functions + */ + +// TESTCASE NUMBER: 3 +fun case_3(value_1: Boolean, value_2: Boolean, value_3: Long) { + 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/neg/5.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/5.2.kt new file mode 100644 index 00000000000..e453b93ea9a --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/5.2.kt @@ -0,0 +1,23 @@ +// FIR_IDENTICAL +// LANGUAGE: +WarnAboutNonExhaustiveWhenOnAlgebraicTypes +// SKIP_TXT + +/* + * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) + * + * SPEC VERSION: 0.1-435 + * MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 5 + * NUMBER: 2 + * DESCRIPTION: 'When' with different variants of the arithmetic expressions (additive expression and multiplicative expression) in 'when condition'. + * HELPERS: typesProvider, classes, functions + */ + +// TESTCASE NUMBER: 1 +fun case_1(value_1: Boolean, value_2: Boolean, value_3: Long) { + 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.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.1.fir.kt index 1d2445072a4..158c5d90262 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 @@ -27,10 +27,6 @@ fun case_3(value_1: Boolean, value_2: Boolean, value_3: Long) { 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.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.1.kt index 8856ef81eb6..0b42d929d42 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 @@ -33,14 +33,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) { +fun case_3(value_1: Boolean, value_2: Boolean, value_3: Long) { 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 5a91a5723e2..ccab631076a 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 @@ -16,14 +16,6 @@ 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) { - value_2, !value_2, getBoolean() && value_2, getChar() != 'a' -> {} - getList() === getAny(), value_3 <= 11 -> {} - } -} - // TESTCASE NUMBER: 4 fun case_4(value_1: String, value_2: String, value_3: String) { when (value_1) { 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 74d9c8ac5a0..29cc0f67f36 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 @@ -26,15 +26,6 @@ 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) { - value_2, !value_2, getBoolean() && value_2, getChar() != 'a' -> {} - getList() === getAny(), value_3 <= 11 -> {} - else -> {} - } -} - // TESTCASE NUMBER: 4 fun case_4(value_1: String, value_2: String, value_3: String) { when (value_1) { diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/testsMap.json b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/testsMap.json index 549dc981a21..d03b005577b 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/testsMap.json +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/testsMap.json @@ -124,6 +124,24 @@ } ], "5": [ + { + "specVersion": "0.1-435", + "casesNumber": 1, + "description": "\u0027When\u0027 with enumeration of the different variants of expressions in \u0027when condition\u0027.", + "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/5.1.kt", + "unexpectedBehaviour": false, + "linkType": "main", + "helpers": "typesProvider, classes, functions" + }, + { + "specVersion": "0.1-435", + "casesNumber": 1, + "description": "\u0027When\u0027 with different variants of the arithmetic expressions (additive expression and multiplicative expression) in \u0027when condition\u0027.", + "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/5.2.kt", + "unexpectedBehaviour": false, + "linkType": "main", + "helpers": "typesProvider, classes, functions" + }, { "specVersion": "0.1-152", "casesNumber": 0, @@ -317,7 +335,7 @@ }, { "specVersion": "0.1-435", - "casesNumber": 26, + "casesNumber": 25, "description": "\u0027When\u0027 with different variants of the arithmetic expressions (additive expression and multiplicative expression) in \u0027when condition\u0027.", "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/5.2.kt", "unexpectedBehaviour": true, @@ -623,229 +641,17 @@ } }, "5": { - "pos": { + "neg": { "1": [ { "specVersion": "0.1-313", - "casesNumber": 2, - "description": "\u0027When\u0027 with bound value and allowed break and continue expression (without labels) in the control structure body.", - "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/pos/1.2.kt", - "unexpectedBehaviour": false, - "linkType": "main" - }, - { - "specVersion": "0.1-313", - "casesNumber": 25, + "casesNumber": 1, "description": "\u0027When\u0027 with bound value and with different variants of expressions in the control structure body.", - "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/pos/1.1.kt", + "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/neg/1.1.kt", "unexpectedBehaviour": false, "linkType": "main", "helpers": "typesProvider, classes, functions" }, - { - "specVersion": "0.1-313", - "casesNumber": 0, - "description": "Annotated when statement", - "path": "compiler/testData/diagnostics/tests/when/AnnotatedWhenStatement.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-313", - "casesNumber": 0, - "description": "Exhaustive platform enum else", - "path": "compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumElse.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-313", - "casesNumber": 0, - "description": "Branch false bypass", - "path": "compiler/testData/diagnostics/tests/when/BranchFalseBypass.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-152", - "casesNumber": 0, - "description": "Exhaustive with nullability check before", - "path": "compiler/testData/diagnostics/tests/when/ExhaustiveWithNullabilityCheckBefore.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-152", - "casesNumber": 0, - "description": "Exhaustive with nullability check else", - "path": "compiler/testData/diagnostics/tests/when/ExhaustiveWithNullabilityCheckElse.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-152", - "casesNumber": 0, - "description": "Kt4434", - "path": "compiler/testData/diagnostics/tests/when/kt4434.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-313", - "casesNumber": 0, - "description": "Duplicated labels", - "path": "compiler/testData/diagnostics/tests/when/DuplicatedLabels.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-152", - "casesNumber": 0, - "description": "Kt10811", - "path": "compiler/testData/diagnostics/tests/when/kt10811.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-152", - "casesNumber": 0, - "description": "Exhaustive platform enum statement", - "path": "compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumStatement.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-313", - "casesNumber": 0, - "description": "Exhaustive platform enum", - "path": "compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnum.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-313", - "casesNumber": 0, - "description": "Comma in when condition without argument", - "path": "compiler/testData/diagnostics/tests/when/CommaInWhenConditionWithoutArgument.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-313", - "casesNumber": 0, - "description": "Exhaustive nullable", - "path": "compiler/testData/diagnostics/tests/when/ExhaustiveNullable.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-313", - "casesNumber": 0, - "description": "Branch false bypass else", - "path": "compiler/testData/diagnostics/tests/when/BranchFalseBypassElse.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-313", - "casesNumber": 0, - "description": "Exhaustive initialization", - "path": "compiler/testData/diagnostics/tests/when/ExhaustiveInitialization.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-152", - "casesNumber": 0, - "description": "Exhaustive with nullability check", - "path": "compiler/testData/diagnostics/tests/when/ExhaustiveWithNullabilityCheck.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-152", - "casesNumber": 0, - "description": "Exhaustive with nullability check boolean", - "path": "compiler/testData/diagnostics/tests/when/ExhaustiveWithNullabilityCheckBoolean.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-313", - "casesNumber": 0, - "description": "Exhaustive platform enum annotated", - "path": "compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumAnnotated.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-152", - "casesNumber": 0, - "description": "No else when statement", - "path": "compiler/testData/diagnostics/tests/when/NoElseWhenStatement.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-152", - "casesNumber": 0, - "description": "Kt10809", - "path": "compiler/testData/diagnostics/tests/when/kt10809.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-152", - "casesNumber": 0, - "description": "Kt10439", - "path": "compiler/testData/diagnostics/tests/when/kt10439.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-152", - "casesNumber": 0, - "description": "Non exhaustive boolean nullable", - "path": "compiler/testData/diagnostics/tests/when/NonExhaustiveBooleanNullable.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-313", - "casesNumber": 0, - "description": "Exhaustive no initialization", - "path": "compiler/testData/diagnostics/tests/when/ExhaustiveNoInitialization.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-152", - "casesNumber": 0, - "description": "Exhaustive return throw", - "path": "compiler/testData/diagnostics/tests/when/ExhaustiveReturnThrow.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-152", - "casesNumber": 0, - "description": "Exhaustive return", - "path": "compiler/testData/diagnostics/tests/when/ExhaustiveReturn.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - }, - { - "specVersion": "0.1-313", - "casesNumber": 0, - "description": "Exhaustive platform enum null", - "path": "compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumNull.kt", - "unexpectedBehaviour": false, - "linkType": "primary" - } - ] - }, - "neg": { - "1": [ { "specVersion": "0.1-152", "casesNumber": 0, @@ -1119,6 +925,227 @@ "linkType": "primary" } ] + }, + "pos": { + "1": [ + { + "specVersion": "0.1-313", + "casesNumber": 2, + "description": "\u0027When\u0027 with bound value and allowed break and continue expression (without labels) in the control structure body.", + "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/pos/1.2.kt", + "unexpectedBehaviour": false, + "linkType": "main" + }, + { + "specVersion": "0.1-313", + "casesNumber": 25, + "description": "\u0027When\u0027 with bound value and with different variants of expressions in the control structure body.", + "path": "compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/pos/1.1.kt", + "unexpectedBehaviour": false, + "linkType": "main", + "helpers": "typesProvider, classes, functions" + }, + { + "specVersion": "0.1-313", + "casesNumber": 0, + "description": "Annotated when statement", + "path": "compiler/testData/diagnostics/tests/when/AnnotatedWhenStatement.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-313", + "casesNumber": 0, + "description": "Exhaustive platform enum else", + "path": "compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumElse.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-313", + "casesNumber": 0, + "description": "Branch false bypass", + "path": "compiler/testData/diagnostics/tests/when/BranchFalseBypass.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-152", + "casesNumber": 0, + "description": "Exhaustive with nullability check before", + "path": "compiler/testData/diagnostics/tests/when/ExhaustiveWithNullabilityCheckBefore.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-152", + "casesNumber": 0, + "description": "Exhaustive with nullability check else", + "path": "compiler/testData/diagnostics/tests/when/ExhaustiveWithNullabilityCheckElse.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-152", + "casesNumber": 0, + "description": "Kt4434", + "path": "compiler/testData/diagnostics/tests/when/kt4434.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-313", + "casesNumber": 0, + "description": "Duplicated labels", + "path": "compiler/testData/diagnostics/tests/when/DuplicatedLabels.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-152", + "casesNumber": 0, + "description": "Kt10811", + "path": "compiler/testData/diagnostics/tests/when/kt10811.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-152", + "casesNumber": 0, + "description": "Exhaustive platform enum statement", + "path": "compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumStatement.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-313", + "casesNumber": 0, + "description": "Exhaustive platform enum", + "path": "compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnum.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-313", + "casesNumber": 0, + "description": "Comma in when condition without argument", + "path": "compiler/testData/diagnostics/tests/when/CommaInWhenConditionWithoutArgument.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-313", + "casesNumber": 0, + "description": "Exhaustive nullable", + "path": "compiler/testData/diagnostics/tests/when/ExhaustiveNullable.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-313", + "casesNumber": 0, + "description": "Branch false bypass else", + "path": "compiler/testData/diagnostics/tests/when/BranchFalseBypassElse.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-313", + "casesNumber": 0, + "description": "Exhaustive initialization", + "path": "compiler/testData/diagnostics/tests/when/ExhaustiveInitialization.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-152", + "casesNumber": 0, + "description": "Exhaustive with nullability check", + "path": "compiler/testData/diagnostics/tests/when/ExhaustiveWithNullabilityCheck.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-152", + "casesNumber": 0, + "description": "Exhaustive with nullability check boolean", + "path": "compiler/testData/diagnostics/tests/when/ExhaustiveWithNullabilityCheckBoolean.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-313", + "casesNumber": 0, + "description": "Exhaustive platform enum annotated", + "path": "compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumAnnotated.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-152", + "casesNumber": 0, + "description": "No else when statement", + "path": "compiler/testData/diagnostics/tests/when/NoElseWhenStatement.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-152", + "casesNumber": 0, + "description": "Kt10809", + "path": "compiler/testData/diagnostics/tests/when/kt10809.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-152", + "casesNumber": 0, + "description": "Kt10439", + "path": "compiler/testData/diagnostics/tests/when/kt10439.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-152", + "casesNumber": 0, + "description": "Non exhaustive boolean nullable", + "path": "compiler/testData/diagnostics/tests/when/NonExhaustiveBooleanNullable.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-313", + "casesNumber": 0, + "description": "Exhaustive no initialization", + "path": "compiler/testData/diagnostics/tests/when/ExhaustiveNoInitialization.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-152", + "casesNumber": 0, + "description": "Exhaustive return throw", + "path": "compiler/testData/diagnostics/tests/when/ExhaustiveReturnThrow.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-152", + "casesNumber": 0, + "description": "Exhaustive return", + "path": "compiler/testData/diagnostics/tests/when/ExhaustiveReturn.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + }, + { + "specVersion": "0.1-313", + "casesNumber": 0, + "description": "Exhaustive platform enum null", + "path": "compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumNull.kt", + "unexpectedBehaviour": false, + "linkType": "primary" + } + ] } }, "9": { diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/testsMap.json b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/testsMap.json index 3a3da168a4a..110534ff5e1 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/testsMap.json +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/testsMap.json @@ -150,14 +150,6 @@ "1": { "neg": { "2": [ - { - "specVersion": "0.1-448", - "casesNumber": 1, - "description": "Non-extension member callables", - "path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.10.kt", - "unexpectedBehaviour": false, - "linkType": "main" - }, { "specVersion": "0.1-448", "casesNumber": 2, @@ -234,6 +226,14 @@ "unexpectedBehaviour": false, "linkType": "main" }, + { + "specVersion": "0.1-448", + "casesNumber": 1, + "description": "Non-extension member callables", + "path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.3.kt", + "unexpectedBehaviour": false, + "linkType": "main" + }, { "specVersion": "0.1-448", "casesNumber": 2, diff --git a/compiler/tests-spec/testData/diagnostics/linked/statements/assignments/operator-assignments/testsMap.json b/compiler/tests-spec/testData/diagnostics/linked/statements/assignments/operator-assignments/testsMap.json index 2a835c94e7a..361777e74a9 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/statements/assignments/operator-assignments/testsMap.json +++ b/compiler/tests-spec/testData/diagnostics/linked/statements/assignments/operator-assignments/testsMap.json @@ -9,14 +9,6 @@ "path": "compiler/tests-spec/testData/diagnostics/linked/statements/assignments/operator-assignments/p-2/neg/1.1.kt", "unexpectedBehaviour": false, "linkType": "main" - }, - { - "specVersion": "0.1-448", - "casesNumber": 1, - "description": "Non-extension member callables", - "path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.10.kt", - "unexpectedBehaviour": false, - "linkType": "secondary" } ], "2": [ @@ -27,14 +19,6 @@ "path": "compiler/tests-spec/testData/diagnostics/linked/statements/assignments/operator-assignments/p-2/neg/1.1.kt", "unexpectedBehaviour": false, "linkType": "primary" - }, - { - "specVersion": "0.1-448", - "casesNumber": 1, - "description": "Non-extension member callables", - "path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.10.kt", - "unexpectedBehaviour": false, - "linkType": "secondary" } ], "3": [ @@ -45,14 +29,6 @@ "path": "compiler/tests-spec/testData/diagnostics/linked/statements/assignments/operator-assignments/p-2/neg/1.1.kt", "unexpectedBehaviour": false, "linkType": "primary" - }, - { - "specVersion": "0.1-448", - "casesNumber": 1, - "description": "Non-extension member callables", - "path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.10.kt", - "unexpectedBehaviour": false, - "linkType": "secondary" } ] }, @@ -66,6 +42,14 @@ "unexpectedBehaviour": false, "linkType": "main" }, + { + "specVersion": "0.1-448", + "casesNumber": 1, + "description": "Non-extension member callables", + "path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.3.kt", + "unexpectedBehaviour": false, + "linkType": "secondary" + }, { "specVersion": "0.1-448", "casesNumber": 2, @@ -84,6 +68,14 @@ "unexpectedBehaviour": false, "linkType": "primary" }, + { + "specVersion": "0.1-448", + "casesNumber": 1, + "description": "Non-extension member callables", + "path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.3.kt", + "unexpectedBehaviour": false, + "linkType": "secondary" + }, { "specVersion": "0.1-448", "casesNumber": 2, @@ -102,6 +94,14 @@ "unexpectedBehaviour": false, "linkType": "primary" }, + { + "specVersion": "0.1-448", + "casesNumber": 1, + "description": "Non-extension member callables", + "path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.3.kt", + "unexpectedBehaviour": false, + "linkType": "secondary" + }, { "specVersion": "0.1-448", "casesNumber": 2, diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/DiagnosticsTestSpecGenerated.java b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/DiagnosticsTestSpecGenerated.java index b215416052f..f703a342075 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/DiagnosticsTestSpecGenerated.java +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/DiagnosticsTestSpecGenerated.java @@ -3385,6 +3385,24 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/neg/1.1.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + } + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/pos") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -3449,6 +3467,16 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/3.2.kt"); } + @TestMetadata("5.1.kt") + public void test5_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/5.1.kt"); + } + + @TestMetadata("5.2.kt") + public void test5_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/5.2.kt"); + } + @TestMetadata("7.1.kt") public void test7_1() throws Exception { runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/7.1.kt"); diff --git a/compiler/util/src/org/jetbrains/kotlin/config/LanguageVersionSettings.kt b/compiler/util/src/org/jetbrains/kotlin/config/LanguageVersionSettings.kt index c96fe945714..ad23a91047d 100644 --- a/compiler/util/src/org/jetbrains/kotlin/config/LanguageVersionSettings.kt +++ b/compiler/util/src/org/jetbrains/kotlin/config/LanguageVersionSettings.kt @@ -416,7 +416,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.7 1.8 1.9 + // 1.0 1.1 1.2 1.3 1.4 1.5..1.8 1.9 // Language: UNSUPPORTED --> DEPRECATED ------> STABLE ---> EXPERIMENTAL // API: UNSUPPORTED --> DEPRECATED ------> STABLE ---> EXPERIMENTAL @@ -430,7 +430,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_7 + val LATEST_STABLE = KOTLIN_1_8 } } diff --git a/core/compiler.common.jvm/src/org/jetbrains/kotlin/load/java/JavaNullabilityAnnotationSettings.kt b/core/compiler.common.jvm/src/org/jetbrains/kotlin/load/java/JavaNullabilityAnnotationSettings.kt index f01fd6f8426..50f88c81f27 100644 --- a/core/compiler.common.jvm/src/org/jetbrains/kotlin/load/java/JavaNullabilityAnnotationSettings.kt +++ b/core/compiler.common.jvm/src/org/jetbrains/kotlin/load/java/JavaNullabilityAnnotationSettings.kt @@ -36,7 +36,7 @@ val NULLABILITY_ANNOTATION_SETTINGS: NullabilityAnnotationStates + + + + + diff --git a/gradle/versions.properties b/gradle/versions.properties index 8d91c94be72..e409bc0add4 100644 --- a/gradle/versions.properties +++ b/gradle/versions.properties @@ -42,7 +42,7 @@ versions.kotlinx-collections-immutable-jvm=0.3.1 versions.kotlinx-collections-immutable=0.3.1 versions.kotlinx-coroutines-core-jvm=1.5.0 versions.kotlinx-coroutines-core=1.5.0 -versions.kotlinx-metadata-jvm=0.4.0 +versions.kotlinx-metadata-jvm=0.5.0 versions.ktor-network=1.0.1 versions.native-platform=0.14 versions.protobuf=2.6.1 diff --git a/libraries/examples/browser-example-with-library/pom.xml b/libraries/examples/browser-example-with-library/pom.xml index fb514b1230b..b6a1fb41340 100644 --- a/libraries/examples/browser-example-with-library/pom.xml +++ b/libraries/examples/browser-example-with-library/pom.xml @@ -8,7 +8,7 @@ org.jetbrains.kotlin kotlin-project - 1.7.255-SNAPSHOT + 1.8.255-SNAPSHOT ../../pom.xml diff --git a/libraries/examples/browser-example/pom.xml b/libraries/examples/browser-example/pom.xml index 8d02c031502..3d87079571a 100644 --- a/libraries/examples/browser-example/pom.xml +++ b/libraries/examples/browser-example/pom.xml @@ -8,7 +8,7 @@ org.jetbrains.kotlin kotlin-project - 1.7.255-SNAPSHOT + 1.8.255-SNAPSHOT ../../pom.xml diff --git a/libraries/examples/js-example/pom.xml b/libraries/examples/js-example/pom.xml index 11c46827454..9d6e2f73b2c 100644 --- a/libraries/examples/js-example/pom.xml +++ b/libraries/examples/js-example/pom.xml @@ -8,7 +8,7 @@ org.jetbrains.kotlin kotlin-project - 1.7.255-SNAPSHOT + 1.8.255-SNAPSHOT ../../pom.xml diff --git a/libraries/examples/kotlin-java-example/pom.xml b/libraries/examples/kotlin-java-example/pom.xml index 679f981ffb9..a46aad011fa 100644 --- a/libraries/examples/kotlin-java-example/pom.xml +++ b/libraries/examples/kotlin-java-example/pom.xml @@ -8,7 +8,7 @@ org.jetbrains.kotlin kotlin-project - 1.7.255-SNAPSHOT + 1.8.255-SNAPSHOT ../../pom.xml diff --git a/libraries/examples/kotlin-js-library-example/pom.xml b/libraries/examples/kotlin-js-library-example/pom.xml index 4f56150396f..da8932ab4ed 100644 --- a/libraries/examples/kotlin-js-library-example/pom.xml +++ b/libraries/examples/kotlin-js-library-example/pom.xml @@ -8,7 +8,7 @@ org.jetbrains.kotlin kotlin-project - 1.7.255-SNAPSHOT + 1.8.255-SNAPSHOT ../../pom.xml diff --git a/libraries/pom.xml b/libraries/pom.xml index 3cbffa44a3e..94d1650db2d 100644 --- a/libraries/pom.xml +++ b/libraries/pom.xml @@ -7,7 +7,7 @@ org.jetbrains.kotlin kotlin-project - 1.7.255-SNAPSHOT + 1.8.255-SNAPSHOT pom Kotlin diff --git a/libraries/stdlib/src/kotlin/util/KotlinVersion.kt b/libraries/stdlib/src/kotlin/util/KotlinVersion.kt index 4932fcb1563..23ebfdb2125 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, 7, 255) // value is written here automatically during build + fun get(): KotlinVersion = KotlinVersion(1, 8, 255) // value is written here automatically during build } \ No newline at end of file diff --git a/libraries/tools/kotlin-annotation-processing-maven/pom.xml b/libraries/tools/kotlin-annotation-processing-maven/pom.xml index 51c7c45af45..50a9a7ee66f 100755 --- a/libraries/tools/kotlin-annotation-processing-maven/pom.xml +++ b/libraries/tools/kotlin-annotation-processing-maven/pom.xml @@ -16,7 +16,7 @@ org.jetbrains.kotlin kotlin-project - 1.7.255-SNAPSHOT + 1.8.255-SNAPSHOT ../../pom.xml diff --git a/libraries/tools/kotlin-bom/pom.xml b/libraries/tools/kotlin-bom/pom.xml index c806b06a7c5..214aed380da 100644 --- a/libraries/tools/kotlin-bom/pom.xml +++ b/libraries/tools/kotlin-bom/pom.xml @@ -7,7 +7,7 @@ org.jetbrains.kotlin kotlin-bom - 1.7.255-SNAPSHOT + 1.8.255-SNAPSHOT pom diff --git a/libraries/tools/kotlin-dist-for-jps-meta/pom.xml b/libraries/tools/kotlin-dist-for-jps-meta/pom.xml index 823da4b972d..e55f56d123e 100644 --- a/libraries/tools/kotlin-dist-for-jps-meta/pom.xml +++ b/libraries/tools/kotlin-dist-for-jps-meta/pom.xml @@ -11,7 +11,7 @@ kotlin-project org.jetbrains.kotlin - 1.7.255-SNAPSHOT + 1.8.255-SNAPSHOT ../../pom.xml diff --git a/libraries/tools/kotlin-gradle-plugin-api/src/common/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinCommonOptions.kt b/libraries/tools/kotlin-gradle-plugin-api/src/common/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinCommonOptions.kt index bf3fbb79f93..41b7547ca4a 100644 --- a/libraries/tools/kotlin-gradle-plugin-api/src/common/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinCommonOptions.kt +++ b/libraries/tools/kotlin-gradle-plugin-api/src/common/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", "1.8 (experimental)", "1.9 (experimental)" + * Possible values: "1.3 (deprecated)", "1.4 (deprecated)", "1.5", "1.6", "1.7", "1.8", "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", "1.8 (experimental)", "1.9 (experimental)" + * Possible values: "1.3 (deprecated)", "1.4 (deprecated)", "1.5", "1.6", "1.7", "1.8", "1.9 (experimental)" * Default value: null */ var languageVersion: kotlin.String? diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/hierarchical-mpp-multi-modules/gradle.properties b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/hierarchical-mpp-multi-modules/gradle.properties index d906e9174e5..689ba582a24 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/hierarchical-mpp-multi-modules/gradle.properties +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/hierarchical-mpp-multi-modules/gradle.properties @@ -1 +1 @@ -publishing_version = 1.0-5.3-1.7.255-SNAPSHOT \ No newline at end of file +publishing_version = 1.0-5.3-1.8.255-SNAPSHOT \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-statistics/src/test/kotlin/MetricPolicyTest.kt b/libraries/tools/kotlin-gradle-statistics/src/test/kotlin/MetricPolicyTest.kt index 7820c252fbb..43eee65224d 100644 --- a/libraries/tools/kotlin-gradle-statistics/src/test/kotlin/MetricPolicyTest.kt +++ b/libraries/tools/kotlin-gradle-statistics/src/test/kotlin/MetricPolicyTest.kt @@ -45,8 +45,8 @@ class MetricPolicyTest { assertEquals("1.2.3", COMPONENT_VERSION.anonymize("1.2.3-unknown suffix")) assertEquals("123.234.345-dev", COMPONENT_VERSION.anonymize("123.234.345-dev-12345")) - assertEquals("1.7.255-snapshot", COMPONENT_VERSION.anonymize("1.7.255-SNAPSHOT")) + assertEquals("1.8.255-snapshot", COMPONENT_VERSION.anonymize("1.8.255-SNAPSHOT")) - assertEquals("1.7.255-beta", COMPONENT_VERSION.anonymize("1.7.255-beta")) + assertEquals("1.8.255-beta", COMPONENT_VERSION.anonymize("1.8.255-beta")) } } \ No newline at end of file diff --git a/libraries/tools/kotlin-maven-allopen/pom.xml b/libraries/tools/kotlin-maven-allopen/pom.xml index e45df14e097..96f46caa829 100755 --- a/libraries/tools/kotlin-maven-allopen/pom.xml +++ b/libraries/tools/kotlin-maven-allopen/pom.xml @@ -17,7 +17,7 @@ org.jetbrains.kotlin kotlin-project - 1.7.255-SNAPSHOT + 1.8.255-SNAPSHOT ../../pom.xml diff --git a/libraries/tools/kotlin-maven-lombok/pom.xml b/libraries/tools/kotlin-maven-lombok/pom.xml index a70d4cbf7ea..4b582ee3a45 100755 --- a/libraries/tools/kotlin-maven-lombok/pom.xml +++ b/libraries/tools/kotlin-maven-lombok/pom.xml @@ -17,7 +17,7 @@ org.jetbrains.kotlin kotlin-project - 1.7.255-SNAPSHOT + 1.8.255-SNAPSHOT ../../pom.xml diff --git a/libraries/tools/kotlin-maven-noarg/pom.xml b/libraries/tools/kotlin-maven-noarg/pom.xml index 615b1d96723..2481dc5f0fd 100755 --- a/libraries/tools/kotlin-maven-noarg/pom.xml +++ b/libraries/tools/kotlin-maven-noarg/pom.xml @@ -18,7 +18,7 @@ org.jetbrains.kotlin kotlin-project - 1.7.255-SNAPSHOT + 1.8.255-SNAPSHOT ../../pom.xml diff --git a/libraries/tools/kotlin-maven-plugin-test/pom.xml b/libraries/tools/kotlin-maven-plugin-test/pom.xml index fcad989c906..5d2677b3ae5 100644 --- a/libraries/tools/kotlin-maven-plugin-test/pom.xml +++ b/libraries/tools/kotlin-maven-plugin-test/pom.xml @@ -5,7 +5,7 @@ kotlin-project org.jetbrains.kotlin - 1.7.255-SNAPSHOT + 1.8.255-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/libraries/tools/kotlin-maven-plugin/pom.xml b/libraries/tools/kotlin-maven-plugin/pom.xml index c739befa0b9..73800c4eab2 100644 --- a/libraries/tools/kotlin-maven-plugin/pom.xml +++ b/libraries/tools/kotlin-maven-plugin/pom.xml @@ -12,7 +12,7 @@ org.jetbrains.kotlin kotlin-project - 1.7.255-SNAPSHOT + 1.8.255-SNAPSHOT ../../pom.xml diff --git a/libraries/tools/kotlin-maven-sam-with-receiver/pom.xml b/libraries/tools/kotlin-maven-sam-with-receiver/pom.xml index 5e8e23a2dc6..650d5fcc51b 100755 --- a/libraries/tools/kotlin-maven-sam-with-receiver/pom.xml +++ b/libraries/tools/kotlin-maven-sam-with-receiver/pom.xml @@ -18,7 +18,7 @@ org.jetbrains.kotlin kotlin-project - 1.7.255-SNAPSHOT + 1.8.255-SNAPSHOT ../../pom.xml diff --git a/libraries/tools/kotlin-maven-serialization/pom.xml b/libraries/tools/kotlin-maven-serialization/pom.xml index 865a5f67f4d..cc7945b52cf 100755 --- a/libraries/tools/kotlin-maven-serialization/pom.xml +++ b/libraries/tools/kotlin-maven-serialization/pom.xml @@ -14,7 +14,7 @@ org.jetbrains.kotlin kotlin-project - 1.7.255-SNAPSHOT + 1.8.255-SNAPSHOT ../../pom.xml diff --git a/libraries/tools/kotlin-osgi-bundle/pom.xml b/libraries/tools/kotlin-osgi-bundle/pom.xml index 0f8146bffcf..7bac0c015c9 100644 --- a/libraries/tools/kotlin-osgi-bundle/pom.xml +++ b/libraries/tools/kotlin-osgi-bundle/pom.xml @@ -5,7 +5,7 @@ kotlin-project org.jetbrains.kotlin - 1.7.255-SNAPSHOT + 1.8.255-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/libraries/tools/kotlin-stdlib-docs/kotlin_big/build.gradle b/libraries/tools/kotlin-stdlib-docs/kotlin_big/build.gradle index 063b333201a..66536dd3845 100644 --- a/libraries/tools/kotlin-stdlib-docs/kotlin_big/build.gradle +++ b/libraries/tools/kotlin-stdlib-docs/kotlin_big/build.gradle @@ -7,7 +7,7 @@ final String kotlinRootDir = rootProject.file("../../../").absolutePath.replace( final String kotlinLibsDir = "$buildDir/libs" final String githubRevision = isTeamcityBuild ? project.property("githubRevision") : "master" -final String kotlinVersion = isTeamcityBuild ? project.property("deployVersion") : "1.7.255-SNAPSHOT" +final String kotlinVersion = isTeamcityBuild ? project.property("deployVersion") : "1.8.255-SNAPSHOT" final String repo = isTeamcityBuild ? project.property("kotlinLibsRepo") : "$kotlinRootDir/build/repo" println("# Extracting info:") diff --git a/libraries/tools/kotlin-tooling-metadata/src/test/kotlin/org/jetbrains/kotlin/tooling/DeserializeStringTest.kt b/libraries/tools/kotlin-tooling-metadata/src/test/kotlin/org/jetbrains/kotlin/tooling/DeserializeStringTest.kt index cb7eadf6dbb..7837531e75b 100644 --- a/libraries/tools/kotlin-tooling-metadata/src/test/kotlin/org/jetbrains/kotlin/tooling/DeserializeStringTest.kt +++ b/libraries/tools/kotlin-tooling-metadata/src/test/kotlin/org/jetbrains/kotlin/tooling/DeserializeStringTest.kt @@ -18,7 +18,7 @@ class DeserializeStringTest { "buildSystem": "Gradle", "buildSystemVersion": "6.7", "buildPlugin": "org.jetbrains.kotlin.gradle.plugin.KotlinMultiplatformPluginWrapper", - "buildPluginVersion": "1.7.255-SNAPSHOT", + "buildPluginVersion": "1.8.255-SNAPSHOT", "projectSettings": { "isHmppEnabled": false, "isCompatibilityMetadataVariantEnabled": true @@ -78,7 +78,7 @@ class DeserializeStringTest { assertEquals("Gradle", metadata.buildSystem) assertEquals("6.7", metadata.buildSystemVersion) assertEquals("org.jetbrains.kotlin.gradle.plugin.KotlinMultiplatformPluginWrapper", metadata.buildPlugin) - assertEquals("1.7.255-SNAPSHOT", metadata.buildPluginVersion) + assertEquals("1.8.255-SNAPSHOT", metadata.buildPluginVersion) assertFalse(metadata.projectSettings.isHmppEnabled) assertTrue(metadata.projectSettings.isCompatibilityMetadataVariantEnabled) assertFalse(metadata.projectSettings.isKPMEnabled) @@ -134,7 +134,7 @@ class DeserializeStringTest { "buildSystem": "Gradle", "buildSystemVersion": "7.1", "buildPlugin": "org.jetbrains.kotlin.gradle.plugin.KotlinMultiplatformPluginWrapper", - "buildPluginVersion": "1.7.255-SNAPSHOT", + "buildPluginVersion": "1.8.255-SNAPSHOT", "projectSettings": { "isHmppEnabled": false, "isCompatibilityMetadataVariantEnabled": true, @@ -191,7 +191,7 @@ class DeserializeStringTest { assertEquals("Gradle", metadata.buildSystem) assertEquals("7.1", metadata.buildSystemVersion) assertEquals("org.jetbrains.kotlin.gradle.plugin.KotlinMultiplatformPluginWrapper", metadata.buildPlugin) - assertEquals("1.7.255-SNAPSHOT", metadata.buildPluginVersion) + assertEquals("1.8.255-SNAPSHOT", metadata.buildPluginVersion) assertFalse(metadata.projectSettings.isHmppEnabled) assertTrue(metadata.projectSettings.isCompatibilityMetadataVariantEnabled) assertTrue(metadata.projectSettings.isKPMEnabled) diff --git a/libraries/tools/maven-archetypes/kotlin-archetype-js/pom.xml b/libraries/tools/maven-archetypes/kotlin-archetype-js/pom.xml index 49da469348c..d5ec511b896 100644 --- a/libraries/tools/maven-archetypes/kotlin-archetype-js/pom.xml +++ b/libraries/tools/maven-archetypes/kotlin-archetype-js/pom.xml @@ -6,7 +6,7 @@ org.jetbrains.kotlin kotlin-archetypes-parent - 1.7.255-SNAPSHOT + 1.8.255-SNAPSHOT ../pom.xml diff --git a/libraries/tools/maven-archetypes/kotlin-archetype-jvm/pom.xml b/libraries/tools/maven-archetypes/kotlin-archetype-jvm/pom.xml index 507614615b5..85f08da3f77 100644 --- a/libraries/tools/maven-archetypes/kotlin-archetype-jvm/pom.xml +++ b/libraries/tools/maven-archetypes/kotlin-archetype-jvm/pom.xml @@ -6,7 +6,7 @@ org.jetbrains.kotlin kotlin-archetypes-parent - 1.7.255-SNAPSHOT + 1.8.255-SNAPSHOT ../pom.xml diff --git a/libraries/tools/maven-archetypes/pom.xml b/libraries/tools/maven-archetypes/pom.xml index 19dede12d44..a76484ab6c3 100644 --- a/libraries/tools/maven-archetypes/pom.xml +++ b/libraries/tools/maven-archetypes/pom.xml @@ -6,7 +6,7 @@ org.jetbrains.kotlin kotlin-project - 1.7.255-SNAPSHOT + 1.8.255-SNAPSHOT ../../pom.xml