diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java index 213360e5931..de7d3bf3311 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java @@ -17339,6 +17339,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/j+k/protectedStaticSamePackage.kt"); } + @Test + @TestMetadata("purelyImplementedSupertype.kt") + public void testPurelyImplementedSupertype() throws Exception { + runTest("compiler/testData/diagnostics/tests/j+k/purelyImplementedSupertype.kt"); + } + @Test @TestMetadata("rawOverride.kt") public void testRawOverride() throws Exception { diff --git a/compiler/fir/analysis-tests/testData/resolve/diagnostics/testIllegalAnnotationClass.fir.txt b/compiler/fir/analysis-tests/testData/resolve/diagnostics/testIllegalAnnotationClass.fir.txt index d405188ea0b..3fa52bbe207 100644 --- a/compiler/fir/analysis-tests/testData/resolve/diagnostics/testIllegalAnnotationClass.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/diagnostics/testIllegalAnnotationClass.fir.txt @@ -7,7 +7,7 @@ FILE: KotlinImporterComponent.kt } public final class State : R|kotlin/Any| { - public constructor(directories: R|kotlin/collections/List| = R|java/util/ArrayList.ArrayList||>()): R|simulation/KotlinImporterComponent.State| { + public constructor(directories: R|kotlin/collections/List| = R|java/util/ArrayList.ArrayList|()): R|simulation/KotlinImporterComponent.State| { super() } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/simpleDelegatedToMap.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/simpleDelegatedToMap.fir.txt index db65b15553e..b80682f1557 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/simpleDelegatedToMap.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/simpleDelegatedToMap.fir.txt @@ -16,10 +16,10 @@ FILE: simpleDelegatedToMap.kt } } - public final var bar: R|ft|by R|kotlin/collections/hashMapOf|() - public get(): R|ft| { - ^ D|/bar|.R|kotlin/collections/getValue||, R|ft|>(Null(null), ::R|/bar|) + public final var bar: R|kotlin/Any|by R|kotlin/collections/hashMapOf|() + public get(): R|kotlin/Any| { + ^ D|/bar|.R|kotlin/collections/getValue|(Null(null), ::R|/bar|) } - public set(: R|ft|): R|kotlin/Unit| { - D|/bar|.R|kotlin/collections/setValue||>(Null(null), ::R|/bar|, R|/bar|) + public set(: R|kotlin/Any|): R|kotlin/Unit| { + D|/bar|.R|kotlin/collections/setValue|(Null(null), ::R|/bar|, R|/bar|) } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/hashSet.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/hashSet.fir.txt index 31c0a3ce0b4..ec5bc94ad99 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/hashSet.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/hashSet.fir.txt @@ -1,10 +1,10 @@ FILE: hashSet.kt - public final val a: R|kotlin/collections/MutableSet?| = R|java/util/HashSet.HashSet||>() + public final val a: R|kotlin/collections/MutableSet?| = R|java/util/HashSet.HashSet|() public get(): R|kotlin/collections/MutableSet?| public final var b: R|kotlin/collections/MutableSet?| = Null(null) public get(): R|kotlin/collections/MutableSet?| public set(_: R|kotlin/collections/MutableSet?|): R|kotlin/Unit| { - F|/b| = R|java/util/HashSet.HashSet||>() + F|/b| = R|java/util/HashSet.HashSet|() } public final var R|kotlin/collections/MutableSet|.d: R|T?| public get(): R|T?| { @@ -17,6 +17,6 @@ FILE: hashSet.kt } public final fun foo(): R|kotlin/Unit| { lvar c: R|kotlin/collections/MutableSet?| = Null(null) - R|/c| = R|java/util/HashSet.HashSet||>() + R|/c| = R|java/util/HashSet.HashSet|() R|/c|!!.R|/d| = R|/produce|() } diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java index 12421e2576d..86991e97451 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java @@ -17339,6 +17339,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/j+k/protectedStaticSamePackage.kt"); } + @Test + @TestMetadata("purelyImplementedSupertype.kt") + public void testPurelyImplementedSupertype() throws Exception { + runTest("compiler/testData/diagnostics/tests/j+k/purelyImplementedSupertype.kt"); + } + @Test @TestMetadata("rawOverride.kt") public void testRawOverride() throws Exception { diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java index b33084d7b56..67c02cc18ae 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java @@ -17339,6 +17339,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/j+k/protectedStaticSamePackage.kt"); } + @Test + @TestMetadata("purelyImplementedSupertype.kt") + public void testPurelyImplementedSupertype() throws Exception { + runTest("compiler/testData/diagnostics/tests/j+k/purelyImplementedSupertype.kt"); + } + @Test @TestMetadata("rawOverride.kt") public void testRawOverride() throws Exception { diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/enhancement/SignatureEnhancement.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/enhancement/SignatureEnhancement.kt index 996f43476cb..9644b9e1f67 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/enhancement/SignatureEnhancement.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/enhancement/SignatureEnhancement.kt @@ -384,9 +384,6 @@ class FirSignatureEnhancement( ownerParameter: FirJavaValueParameter, index: Int ): FirResolvedTypeRef { - if (ownerParameter.returnTypeRef is FirResolvedTypeRef) { - return ownerParameter.returnTypeRef as FirResolvedTypeRef - } return ownerFunction.enhanceValueParameter( overriddenMembers, ownerParameter, diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/scopes/JavaClassMembersEnhancementScope.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/scopes/JavaClassMembersEnhancementScope.kt index a0fb2bdb350..c8712ba7167 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/scopes/JavaClassMembersEnhancementScope.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/scopes/JavaClassMembersEnhancementScope.kt @@ -13,6 +13,7 @@ import org.jetbrains.kotlin.fir.java.enhancement.FirSignatureEnhancement import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor import org.jetbrains.kotlin.fir.scopes.FirTypeScope import org.jetbrains.kotlin.fir.scopes.ProcessorAction +import org.jetbrains.kotlin.fir.scopes.impl.FirTypeIntersectionScope import org.jetbrains.kotlin.fir.symbols.impl.* import org.jetbrains.kotlin.name.Name @@ -26,7 +27,7 @@ class JavaClassMembersEnhancementScope( private val overrideBindCache = mutableMapOf?, List>>() private val signatureEnhancement = FirSignatureEnhancement(owner.fir, session) { - overriddenMembers(name) + overriddenMembersForEnhancement(name) } override fun processPropertiesByName(name: Name, processor: (FirVariableSymbol<*>) -> Unit) { @@ -64,6 +65,23 @@ class JavaClassMembersEnhancementScope( return super.processFunctionsByName(name, processor) } + private fun FirCallableDeclaration.overriddenMembersForEnhancement(name: Name): List { + val directlyOverriddensFromScopeFir = overriddenMembers(name) + val superTypesScope = useSiteMemberScope.superTypesScope as? FirTypeIntersectionScope ?: return directlyOverriddensFromScopeFir + + val directlyOverriddensFromScope = directlyOverriddensFromScopeFir.map { it.symbol } + val result = mutableSetOf>() + for (intersectedOverriddenSymbol in directlyOverriddensFromScope) { + val newOverriddens = superTypesScope.getDirectOverriddenSymbols(intersectedOverriddenSymbol).map { it.member } + if (newOverriddens.isNotEmpty()) { + result += newOverriddens + } else { + result += intersectedOverriddenSymbol + } + } + return result.map { it.fir } + } + private fun FirCallableDeclaration.overriddenMembers(name: Name): List { val backMap = overrideBindCache.getOrPut(name) { val result = mutableMapOf?, MutableList>() diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/AbstractFirUseSiteMemberScope.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/AbstractFirUseSiteMemberScope.kt index 100db5f4dae..5ffa71596a5 100644 --- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/AbstractFirUseSiteMemberScope.kt +++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/AbstractFirUseSiteMemberScope.kt @@ -19,7 +19,7 @@ abstract class AbstractFirUseSiteMemberScope( val classId: ClassId, session: FirSession, overrideChecker: FirOverrideChecker, - protected val superTypesScope: FirTypeScope, + val superTypesScope: FirTypeScope, protected val declaredMemberScope: FirContainingNamesAwareScope ) : AbstractFirOverrideScope(session, overrideChecker) { diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScope.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScope.kt index 0c611d62bc7..dd298475036 100644 --- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScope.kt +++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScope.kt @@ -159,8 +159,7 @@ class FirTypeIntersectionScope private constructor( }.withScope(scopeForMostSpecific) } - private fun > - MutableList>.calcBaseMembersForIntersectionOverride(): List> { + private fun > List>.calcBaseMembersForIntersectionOverride(): List> { if (size == 1) return this val unwrappedMemberSet = mutableSetOf>() for ((member, scope) in this) { @@ -195,8 +194,9 @@ class FirTypeIntersectionScope private constructor( } } } - removeIf { (member, _) -> member.fir.unwrapSubstitutionOverrides().symbol in baseMembers } - return this + val result = this.toMutableList() + result.removeIf { (member, _) -> member.fir.unwrapSubstitutionOverrides().symbol in baseMembers } + return result } private fun > chooseIntersectionOverrideModality( @@ -514,7 +514,7 @@ class FirTypeIntersectionScope private constructor( } @Suppress("UNCHECKED_CAST") - private fun > getDirectOverriddenSymbols(symbol: S): Collection> { + fun > getDirectOverriddenSymbols(symbol: S): Collection> { val intersectionOverride = intersectionOverrides.getValueIfComputed(symbol) val allDirectOverridden = overriddenSymbols[symbol].orEmpty() + intersectionOverride?.let { overriddenSymbols[it.member] diff --git a/compiler/testData/diagnostics/tests/cast/IsErasedAllowForTypeWithIrrelevantMixin.fir.kt b/compiler/testData/diagnostics/tests/cast/IsErasedAllowForTypeWithIrrelevantMixin.fir.kt deleted file mode 100644 index 0ca00c0f869..00000000000 --- a/compiler/testData/diagnostics/tests/cast/IsErasedAllowForTypeWithIrrelevantMixin.fir.kt +++ /dev/null @@ -1,9 +0,0 @@ -interface A -interface B: A -interface D - -interface BaseSuper -interface BaseImpl: BaseSuper -interface DerivedSuper: BaseSuper, BaseImpl - -fun test(t: BaseSuper) = t is DerivedSuper diff --git a/compiler/testData/diagnostics/tests/cast/IsErasedAllowForTypeWithIrrelevantMixin.kt b/compiler/testData/diagnostics/tests/cast/IsErasedAllowForTypeWithIrrelevantMixin.kt index 296ae7582aa..2fe07a78dc0 100644 --- a/compiler/testData/diagnostics/tests/cast/IsErasedAllowForTypeWithIrrelevantMixin.kt +++ b/compiler/testData/diagnostics/tests/cast/IsErasedAllowForTypeWithIrrelevantMixin.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL interface A interface B: A interface D diff --git a/compiler/testData/diagnostics/tests/j+k/purelyImplementedSupertype.fir.kt b/compiler/testData/diagnostics/tests/j+k/purelyImplementedSupertype.fir.kt new file mode 100644 index 00000000000..053114311ea --- /dev/null +++ b/compiler/testData/diagnostics/tests/j+k/purelyImplementedSupertype.fir.kt @@ -0,0 +1,29 @@ +// FULL_JDK + +// FILE: Util.java +public class Util { + public static String getString() { return null; } +} + +// FILE: main.kt +import java.util.concurrent.ConcurrentHashMap + +fun testWithMap(map: ConcurrentHashMap): Int { + var string = map[1] + if (string == null) { + string = map.computeIfAbsent(1) { "hello" } + } + return string.length +} + +fun testWithUtil(map: ConcurrentHashMap): Int { + var string = map[1] + if (string == null) { + string = Util.getString() + } + return string.length +} + +fun test(list: java.util.ArrayList) { + val x = list.get(0).length +} diff --git a/compiler/testData/diagnostics/tests/j+k/purelyImplementedSupertype.kt b/compiler/testData/diagnostics/tests/j+k/purelyImplementedSupertype.kt new file mode 100644 index 00000000000..533cf4e1c57 --- /dev/null +++ b/compiler/testData/diagnostics/tests/j+k/purelyImplementedSupertype.kt @@ -0,0 +1,29 @@ +// FULL_JDK + +// FILE: Util.java +public class Util { + public static String getString() { return null; } +} + +// FILE: main.kt +import java.util.concurrent.ConcurrentHashMap + +fun testWithMap(map: ConcurrentHashMap): Int { + var string = map[1] + if (string == null) { + string = map.computeIfAbsent(1) { "hello" } + } + return string.length +} + +fun testWithUtil(map: ConcurrentHashMap): Int { + var string = map[1] + if (string == null) { + string = Util.getString() + } + return string.length +} + +fun test(list: java.util.ArrayList) { + val x = list.get(0).length +} diff --git a/compiler/testData/diagnostics/tests/j+k/purelyImplementedSupertype.txt b/compiler/testData/diagnostics/tests/j+k/purelyImplementedSupertype.txt new file mode 100644 index 00000000000..fac56294736 --- /dev/null +++ b/compiler/testData/diagnostics/tests/j+k/purelyImplementedSupertype.txt @@ -0,0 +1,15 @@ +package + +public fun test(/*0*/ list: java.util.ArrayList): kotlin.Unit +public fun testWithMap(/*0*/ map: java.util.concurrent.ConcurrentHashMap): kotlin.Int +public fun testWithUtil(/*0*/ map: java.util.concurrent.ConcurrentHashMap): kotlin.Int + +public open class Util { + public constructor Util() + 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 + + // Static members + public open fun getString(): kotlin.String! +} diff --git a/compiler/testData/diagnostics/tests/override/FakeOverrideModality3.fir.kt b/compiler/testData/diagnostics/tests/override/FakeOverrideModality3.fir.kt new file mode 100644 index 00000000000..9aca1afc65f --- /dev/null +++ b/compiler/testData/diagnostics/tests/override/FakeOverrideModality3.fir.kt @@ -0,0 +1,16 @@ +interface A { + fun foo() {} +} + +interface B : A { + abstract override fun foo() +} + +interface C : A { + abstract override fun foo() +} + +interface D : A + +// Fake override Z#foo should be abstract +class Z : B, C, D diff --git a/compiler/testData/diagnostics/tests/override/FakeOverrideModality3.kt b/compiler/testData/diagnostics/tests/override/FakeOverrideModality3.kt index e199f95f23d..485981df58d 100644 --- a/compiler/testData/diagnostics/tests/override/FakeOverrideModality3.kt +++ b/compiler/testData/diagnostics/tests/override/FakeOverrideModality3.kt @@ -1,4 +1,3 @@ -// FIR_IDENTICAL interface A { fun foo() {} } diff --git a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/enhancementFromAnnotation.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/enhancementFromAnnotation.fir.kt deleted file mode 100644 index 59a9fc1f575..00000000000 --- a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/enhancementFromAnnotation.fir.kt +++ /dev/null @@ -1,28 +0,0 @@ -// FILE: A.java - -import org.jetbrains.annotations.NotNull; -public interface A { - void foo(@NotNull T x); -} - -// FILE: B.java -public class B { - public void foo(E x) {} -} - -// FILE: C.java -public class C extends B implements A { - public static C create() { return null; } - public void foo(F x) {} -} - -// FILE: main.kt - -fun test() { - C.create().foo(null) - C.create().foo("") - - C().foo(null) - C().foo(null) - C().foo("") -} diff --git a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/enhancementFromAnnotation.kt b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/enhancementFromAnnotation.kt index d0b9ad12f59..0a600bf290f 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/enhancementFromAnnotation.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/enhancementFromAnnotation.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FILE: A.java import org.jetbrains.annotations.NotNull; diff --git a/compiler/testData/diagnostics/tests/subtyping/findClosestCorrespondingSupertype.fir.kt b/compiler/testData/diagnostics/tests/subtyping/findClosestCorrespondingSupertype.fir.kt deleted file mode 100644 index be4c844abff..00000000000 --- a/compiler/testData/diagnostics/tests/subtyping/findClosestCorrespondingSupertype.fir.kt +++ /dev/null @@ -1,10 +0,0 @@ -// !DIAGNOSTICS: -UNUSED_VARIABLE - -interface X -interface A: X -interface B : A, X - -fun foo(x: B) { - // Checks that when checking subtypes we search closes corresponding constructor (e.g. with BFS) - val y: X = x -} diff --git a/compiler/testData/diagnostics/tests/subtyping/findClosestCorrespondingSupertype.kt b/compiler/testData/diagnostics/tests/subtyping/findClosestCorrespondingSupertype.kt index a0123248f44..762bccc3149 100644 --- a/compiler/testData/diagnostics/tests/subtyping/findClosestCorrespondingSupertype.kt +++ b/compiler/testData/diagnostics/tests/subtyping/findClosestCorrespondingSupertype.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !DIAGNOSTICS: -UNUSED_VARIABLE interface X diff --git a/compiler/testData/diagnostics/tests/subtyping/javaAndKotlinSuperType.fir.kt b/compiler/testData/diagnostics/tests/subtyping/javaAndKotlinSuperType.fir.kt index 054bfda7853..492c7ce98da 100644 --- a/compiler/testData/diagnostics/tests/subtyping/javaAndKotlinSuperType.fir.kt +++ b/compiler/testData/diagnostics/tests/subtyping/javaAndKotlinSuperType.fir.kt @@ -20,11 +20,11 @@ fun test(b: B, c: C, d: D, e: E) { eatAString(b) eatAString(c) eatAString(d) - eatAString(e) + eatAString(e) eatAStringN(b) eatAStringN(c) - eatAStringN(d) + eatAStringN(d) eatAStringN(e) } @@ -39,4 +39,4 @@ class W: B(), Z fun test2(w: W) { eatAString(w) eatAStringN(w) -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/tests/subtyping/javaAndKotlinSuperType.kt b/compiler/testData/diagnostics/tests/subtyping/javaAndKotlinSuperType.kt index 79c18cb27b3..646fd472a92 100644 --- a/compiler/testData/diagnostics/tests/subtyping/javaAndKotlinSuperType.kt +++ b/compiler/testData/diagnostics/tests/subtyping/javaAndKotlinSuperType.kt @@ -39,4 +39,4 @@ class W: B(), Z fun test2(w: W) { eatAString(w) eatAStringN(w) -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/tests/targetedBuiltIns/concurrentMapRemove.fir.kt b/compiler/testData/diagnostics/tests/targetedBuiltIns/concurrentMapRemove.fir.kt index eb6adfc0c34..cf2e17ebd74 100644 --- a/compiler/testData/diagnostics/tests/targetedBuiltIns/concurrentMapRemove.fir.kt +++ b/compiler/testData/diagnostics/tests/targetedBuiltIns/concurrentMapRemove.fir.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.fir.kt b/compiler/testData/diagnostics/tests/targetedBuiltIns/mutableMapRemove.fir.kt index bf126b412d9..e64d32d5afa 100644 --- a/compiler/testData/diagnostics/tests/targetedBuiltIns/mutableMapRemove.fir.kt +++ b/compiler/testData/diagnostics/tests/targetedBuiltIns/mutableMapRemove.fir.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/testsWithStdLib/purelyImplementedCollection/maps.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/maps.fir.kt index 7dd02966ca7..c391575cc5e 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/maps.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/maps.fir.kt @@ -9,20 +9,20 @@ val nullableInt: Int? = null fun hashMapTest() { var x: HashMap = HashMap() - x.put(null, null) - x.put("", null) - x.put(bar(), 1) + x.put(null, null) + x.put("", null) + x.put(bar(), 1) x.put("", 1) - x[null] = 1 - x[bar()] = 1 - x[""] = nullableInt + x[null] = 1 + x[bar()] = 1 + x[""] = nullableInt x[""] = 1 - val b1: MutableMap = x + val b1: MutableMap = x val b2: MutableMap = x - val b3: Map = x - val b4: Map = x + val b3: Map = x + val b4: Map = x val b5: Map = x val b6: Int = x[""] @@ -33,20 +33,20 @@ fun hashMapTest() { fun treeMapTest() { var x: TreeMap = TreeMap() - x.put(null, null) - x.put("", null) - x.put(bar(), 1) + x.put(null, null) + x.put("", null) + x.put(bar(), 1) x.put("", 1) - x[null] = 1 - x[bar()] = 1 - x[""] = nullableInt + x[null] = 1 + x[bar()] = 1 + x[""] = nullableInt x[""] = 1 - val b1: MutableMap = x + val b1: MutableMap = x val b2: MutableMap = x - val b3: Map = x - val b4: Map = x + val b3: Map = x + val b4: Map = x val b5: Map = x val b6: Int = x[""] @@ -57,20 +57,20 @@ fun treeMapTest() { fun concurrentHashMapTest() { var x: ConcurrentHashMap = ConcurrentHashMap() - x.put(null, null) - x.put("", null) - x.put(bar(), 1) + x.put(null, null) + x.put("", null) + x.put(bar(), 1) x.put("", 1) - x[null] = 1 - x[bar()] = 1 - x[""] = nullableInt + x[null] = 1 + x[bar()] = 1 + x[""] = nullableInt x[""] = 1 - val b1: MutableMap = x + val b1: MutableMap = x val b2: MutableMap = x - val b3: Map = x - val b4: Map = x + val b3: Map = x + val b4: Map = x val b5: Map = x val b6: Int = x[""] diff --git a/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/mapsWithNullableKey.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/mapsWithNullableKey.fir.kt index 91cd0c8b596..c84b85f1037 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/mapsWithNullableKey.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/mapsWithNullableKey.fir.kt @@ -8,17 +8,18 @@ val nullableInt: Int? = null fun hashMapTest() { var x: HashMap = HashMap() - x.put(null, null) - x.put("", null) + x.put(null, null) + x.put("", null) x.put(bar(), 1) x.put("", 1) x[null] = 1 x[bar()] = 1 - x[""] = nullableInt + x[""] = nullableInt x[""] = 1 + x[""] = null - val b1: MutableMap = x + val b1: MutableMap = x val b2: MutableMap = x val b3: Map = x val b4: Map = x @@ -33,17 +34,17 @@ fun hashMapTest() { fun treeMapTest() { var x: TreeMap = TreeMap() - x.put(null, null) - x.put("", null) + x.put(null, null) + x.put("", null) x.put(bar(), 1) x.put("", 1) x[null] = 1 x[bar()] = 1 - x[""] = nullableInt + x[""] = nullableInt x[""] = 1 - val b1: MutableMap = x + val b1: MutableMap = x val b2: MutableMap = x val b3: Map = x val b4: Map = x diff --git a/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/mapsWithNullableKey.kt b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/mapsWithNullableKey.kt index 5cc6b9d2d5c..c6946ee7469 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/mapsWithNullableKey.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/mapsWithNullableKey.kt @@ -17,6 +17,7 @@ fun hashMapTest() { x[bar()] = 1 x[""] = nullableInt x[""] = 1 + x[""] = null val b1: MutableMap = x val b2: MutableMap = x diff --git a/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/mapsWithNullableValues.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/mapsWithNullableValues.fir.kt index 5b902849e25..450696477da 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/mapsWithNullableValues.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/mapsWithNullableValues.fir.kt @@ -8,13 +8,13 @@ val nullableInt: Int? = null fun hashMapTest() { var x: HashMap = HashMap() - x.put(null, null) + x.put(null, null) x.put("", null) - x.put(bar(), 1) + x.put(bar(), 1) x.put("", 1) - x[null] = 1 - x[bar()] = 1 + x[null] = 1 + x[bar()] = 1 x[""] = nullableInt x[""] = 1 @@ -22,7 +22,7 @@ fun hashMapTest() { val b2: MutableMap = x val b3: Map = x val b4: Map = x - val b5: Map = x + val b5: Map = x val b6: Int = x[""] val b7: Int = x.get("") @@ -32,13 +32,13 @@ fun hashMapTest() { fun treeMapTest() { var x: TreeMap = TreeMap() - x.put(null, null) + x.put(null, null) x.put("", null) - x.put(bar(), 1) + x.put(bar(), 1) x.put("", 1) - x[null] = 1 - x[bar()] = 1 + x[null] = 1 + x[bar()] = 1 x[""] = nullableInt x[""] = 1 @@ -46,7 +46,7 @@ fun treeMapTest() { val b2: MutableMap = x val b3: Map = x val b4: Map = x - val b5: Map = x + val b5: Map = x val b6: Int = x[""] val b7: Int = x.get("") diff --git a/compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/unsupportedFeature.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/unsupportedFeature.fir.kt index d2258a28a22..ac09552fc76 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/unsupportedFeature.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/unsupportedFeature.fir.kt @@ -45,7 +45,7 @@ fun foo(x: List, y: Throwable, z: A3) { y.fillInStackTrace() checkType { _() } - HashMap().getOrDefault(Any(), null) + HashMap().getOrDefault(Any(), null) // Falls back to extension in stdlib y.printStackTrace() diff --git a/compiler/testData/ir/irText/declarations/classLevelProperties.fir.ir.txt b/compiler/testData/ir/irText/declarations/classLevelProperties.fir.ir.txt index 1e4f1dd7d2e..64f3bb3ebac 100644 --- a/compiler/testData/ir/irText/declarations/classLevelProperties.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/classLevelProperties.fir.ir.txt @@ -118,30 +118,30 @@ FILE fqName: fileName:/classLevelProperties.kt CALL 'public final fun hashMapOf (): java.util.HashMap [inline] declared in kotlin.collections.MapsKt' type=java.util.HashMap origin=null : kotlin.String : kotlin.Int - FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.C) returnType:@[FlexibleNullability] kotlin.Int? + FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.C) returnType:kotlin.Int correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [delegated,var] $this: VALUE_PARAMETER name: type:.C BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): @[FlexibleNullability] kotlin.Int? declared in .C' - CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): V1 of kotlin.collections.MapAccessorsKt.getValue [inline,operator] declared in kotlin.collections.MapAccessorsKt' type=@[FlexibleNullability] kotlin.Int? origin=null - : @[FlexibleNullability] kotlin.Int? - : @[FlexibleNullability] kotlin.Int? + RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .C' + CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): V1 of kotlin.collections.MapAccessorsKt.getValue [inline,operator] declared in kotlin.collections.MapAccessorsKt' type=kotlin.Int origin=null + : kotlin.Int + : kotlin.Int $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test8$delegate type:java.util.HashMap visibility:private [final]' type=java.util.HashMap origin=null receiver: GET_VAR ': .C declared in .C.' type=.C origin=null thisRef: GET_VAR ': .C declared in .C.' type=.C origin=null - property: PROPERTY_REFERENCE 'public final test8: @[FlexibleNullability] kotlin.Int? [delegated,var]' field=null getter='public final fun (): @[FlexibleNullability] kotlin.Int? declared in .C' setter='public final fun (: @[FlexibleNullability] kotlin.Int?): kotlin.Unit declared in .C' type=kotlin.reflect.KMutableProperty1<.C, @[FlexibleNullability] kotlin.Int?> origin=PROPERTY_REFERENCE_FOR_DELEGATE - FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.C, :@[FlexibleNullability] kotlin.Int?) returnType:kotlin.Unit + property: PROPERTY_REFERENCE 'public final test8: kotlin.Int [delegated,var]' field=null getter='public final fun (): kotlin.Int declared in .C' setter='public final fun (: kotlin.Int): kotlin.Unit declared in .C' type=kotlin.reflect.KMutableProperty1<.C, kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE + FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.C, :kotlin.Int) returnType:kotlin.Unit correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [delegated,var] $this: VALUE_PARAMETER name: type:.C - VALUE_PARAMETER name: index:0 type:@[FlexibleNullability] kotlin.Int? + VALUE_PARAMETER name: index:0 type:kotlin.Int BLOCK_BODY CALL 'public final fun setValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>, value: V of kotlin.collections.MapAccessorsKt.setValue): kotlin.Unit [inline,operator] declared in kotlin.collections.MapAccessorsKt' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Int? + : kotlin.Int $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test8$delegate type:java.util.HashMap visibility:private [final]' type=java.util.HashMap origin=null receiver: GET_VAR ': .C declared in .C.' type=.C origin=null thisRef: GET_VAR ': .C declared in .C.' type=.C origin=null - property: PROPERTY_REFERENCE 'public final test8: @[FlexibleNullability] kotlin.Int? [delegated,var]' field=null getter='public final fun (): @[FlexibleNullability] kotlin.Int? declared in .C' setter='public final fun (: @[FlexibleNullability] kotlin.Int?): kotlin.Unit declared in .C' type=kotlin.reflect.KMutableProperty1<.C, @[FlexibleNullability] kotlin.Int?> origin=PROPERTY_REFERENCE_FOR_DELEGATE - value: GET_VAR ': @[FlexibleNullability] kotlin.Int? declared in .C.' type=@[FlexibleNullability] kotlin.Int? origin=null + property: PROPERTY_REFERENCE 'public final test8: kotlin.Int [delegated,var]' field=null getter='public final fun (): kotlin.Int declared in .C' setter='public final fun (: kotlin.Int): kotlin.Unit declared in .C' type=kotlin.reflect.KMutableProperty1<.C, kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE + value: GET_VAR ': kotlin.Int declared in .C.' type=kotlin.Int origin=null 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 [operator] declared in kotlin.Any diff --git a/compiler/testData/ir/irText/declarations/classLevelProperties.fir.kt.txt b/compiler/testData/ir/irText/declarations/classLevelProperties.fir.kt.txt index d609799a849..4b07fa2264b 100644 --- a/compiler/testData/ir/irText/declarations/classLevelProperties.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/classLevelProperties.fir.kt.txt @@ -44,13 +44,14 @@ class C { return .#test7$delegate.getValue(thisRef = , property = C::test7) } - var test8: @FlexibleNullability Int? /* by */ + var test8: Int /* by */ field = hashMapOf() - get(): @FlexibleNullability Int? { - return .#test8$delegate.getValue<@FlexibleNullability Int?, @FlexibleNullability Int?>(thisRef = , property = C::test8) + get(): Int { + return .#test8$delegate.getValue(thisRef = , property = C::test8) } - set(: @FlexibleNullability Int?) { - .#test8$delegate.setValue<@FlexibleNullability Int?>(thisRef = , property = C::test8, value = ) + set(: Int) { + .#test8$delegate.setValue(thisRef = , property = C::test8, value = ) } } + diff --git a/compiler/testData/ir/irText/declarations/delegatedProperties.fir.ir.txt b/compiler/testData/ir/irText/declarations/delegatedProperties.fir.ir.txt index 24712f10c48..2634f35e305 100644 --- a/compiler/testData/ir/irText/declarations/delegatedProperties.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/delegatedProperties.fir.ir.txt @@ -105,23 +105,23 @@ FILE fqName: fileName:/delegatedProperties.kt CALL 'public final fun hashMapOf (): java.util.HashMap [inline] declared in kotlin.collections.MapsKt' type=java.util.HashMap origin=null : kotlin.String : kotlin.Any - FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:@[FlexibleNullability] kotlin.Any? + FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Any correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL [delegated,var] BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): @[FlexibleNullability] kotlin.Any? declared in ' - CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): V1 of kotlin.collections.MapAccessorsKt.getValue [inline,operator] declared in kotlin.collections.MapAccessorsKt' type=@[FlexibleNullability] kotlin.Any? origin=null - : @[FlexibleNullability] kotlin.Any? - : @[FlexibleNullability] kotlin.Any? + RETURN type=kotlin.Nothing from='public final fun (): kotlin.Any declared in ' + CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): V1 of kotlin.collections.MapAccessorsKt.getValue [inline,operator] declared in kotlin.collections.MapAccessorsKt' type=kotlin.Any origin=null + : kotlin.Any + : kotlin.Any $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test4$delegate type:java.util.HashMap visibility:private [final,static]' type=java.util.HashMap origin=null thisRef: CONST Null type=kotlin.Nothing? value=null - property: PROPERTY_REFERENCE 'public final test4: @[FlexibleNullability] kotlin.Any? [delegated,var]' field=null getter='public final fun (): @[FlexibleNullability] kotlin.Any? declared in ' setter='public final fun (: @[FlexibleNullability] kotlin.Any?): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0<@[FlexibleNullability] kotlin.Any?> origin=PROPERTY_REFERENCE_FOR_DELEGATE - FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:@[FlexibleNullability] kotlin.Any?) returnType:kotlin.Unit + property: PROPERTY_REFERENCE 'public final test4: kotlin.Any [delegated,var]' field=null getter='public final fun (): kotlin.Any declared in ' setter='public final fun (: kotlin.Any): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE + FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:kotlin.Any) returnType:kotlin.Unit correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL [delegated,var] - VALUE_PARAMETER name: index:0 type:@[FlexibleNullability] kotlin.Any? + VALUE_PARAMETER name: index:0 type:kotlin.Any BLOCK_BODY CALL 'public final fun setValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>, value: V of kotlin.collections.MapAccessorsKt.setValue): kotlin.Unit [inline,operator] declared in kotlin.collections.MapAccessorsKt' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Any? + : kotlin.Any $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test4$delegate type:java.util.HashMap visibility:private [final,static]' type=java.util.HashMap origin=null thisRef: CONST Null type=kotlin.Nothing? value=null - property: PROPERTY_REFERENCE 'public final test4: @[FlexibleNullability] kotlin.Any? [delegated,var]' field=null getter='public final fun (): @[FlexibleNullability] kotlin.Any? declared in ' setter='public final fun (: @[FlexibleNullability] kotlin.Any?): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0<@[FlexibleNullability] kotlin.Any?> origin=PROPERTY_REFERENCE_FOR_DELEGATE - value: GET_VAR ': @[FlexibleNullability] kotlin.Any? declared in .' type=@[FlexibleNullability] kotlin.Any? origin=null + property: PROPERTY_REFERENCE 'public final test4: kotlin.Any [delegated,var]' field=null getter='public final fun (): kotlin.Any declared in ' setter='public final fun (: kotlin.Any): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE + value: GET_VAR ': kotlin.Any declared in .' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/declarations/delegatedProperties.fir.kt.txt b/compiler/testData/ir/irText/declarations/delegatedProperties.fir.kt.txt index 1f250a0bf10..9bcdb5124f0 100644 --- a/compiler/testData/ir/irText/declarations/delegatedProperties.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/delegatedProperties.fir.kt.txt @@ -38,11 +38,12 @@ class C { } -var test4: @FlexibleNullability Any? /* by */ +var test4: Any /* by */ field = hashMapOf() - get(): @FlexibleNullability Any? { - return #test4$delegate.getValue<@FlexibleNullability Any?, @FlexibleNullability Any?>(thisRef = null, property = ::test4) + get(): Any { + return #test4$delegate.getValue(thisRef = null, property = ::test4) } - set(: @FlexibleNullability Any?) { - #test4$delegate.setValue<@FlexibleNullability Any?>(thisRef = null, property = ::test4, value = ) + set(: Any) { + #test4$delegate.setValue(thisRef = null, property = ::test4, value = ) } + diff --git a/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.ir.txt b/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.ir.txt index 5cd1a9059e6..b5d907a265d 100644 --- a/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.ir.txt @@ -22,39 +22,40 @@ FILE fqName: fileName:/localDelegatedProperties.kt message: CALL 'local final fun (): kotlin.Int declared in .test1' type=kotlin.Int origin=GET_LOCAL_PROPERTY FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - LOCAL_DELEGATED_PROPERTY name:x type:@[FlexibleNullability] kotlin.Int? flags:var + LOCAL_DELEGATED_PROPERTY name:x type:kotlin.Int flags:var VAR PROPERTY_DELEGATE name:x$delegate type:java.util.HashMap [val] CALL 'public final fun hashMapOf (): java.util.HashMap [inline] declared in kotlin.collections.MapsKt' type=java.util.HashMap origin=null : kotlin.String : kotlin.Int - FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:local modality:FINAL <> () returnType:@[FlexibleNullability] kotlin.Int? + FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:local modality:FINAL <> () returnType:kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (): @[FlexibleNullability] kotlin.Int? declared in .test2' - CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): V1 of kotlin.collections.MapAccessorsKt.getValue [inline,operator] declared in kotlin.collections.MapAccessorsKt' type=@[FlexibleNullability] kotlin.Int? origin=null - : @[FlexibleNullability] kotlin.Int? - : @[FlexibleNullability] kotlin.Int? + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Int declared in .test2' + CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): V1 of kotlin.collections.MapAccessorsKt.getValue [inline,operator] declared in kotlin.collections.MapAccessorsKt' type=kotlin.Int origin=null + : kotlin.Int + : kotlin.Int $receiver: GET_VAR 'val x$delegate: java.util.HashMap [val] declared in .test2' type=java.util.HashMap origin=null thisRef: CONST Null type=kotlin.Nothing? value=null - property: LOCAL_DELEGATED_PROPERTY_REFERENCE 'var x: @[FlexibleNullability] kotlin.Int? by (...)' delegate='val x$delegate: java.util.HashMap [val] declared in .test2' getter='local final fun (): @[FlexibleNullability] kotlin.Int? declared in .test2' setter='local final fun (: @[FlexibleNullability] kotlin.Int?): kotlin.Unit declared in .test2' type=kotlin.reflect.KMutableProperty0<@[FlexibleNullability] kotlin.Int?> origin=PROPERTY_REFERENCE_FOR_DELEGATE - FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:local modality:FINAL <> (:@[FlexibleNullability] kotlin.Int?) returnType:kotlin.Unit - VALUE_PARAMETER name: index:0 type:@[FlexibleNullability] kotlin.Int? + property: LOCAL_DELEGATED_PROPERTY_REFERENCE 'var x: kotlin.Int by (...)' delegate='val x$delegate: java.util.HashMap [val] declared in .test2' getter='local final fun (): kotlin.Int declared in .test2' setter='local final fun (: kotlin.Int): kotlin.Unit declared in .test2' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE + FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:local modality:FINAL <> (:kotlin.Int) returnType:kotlin.Unit + VALUE_PARAMETER name: index:0 type:kotlin.Int BLOCK_BODY CALL 'public final fun setValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>, value: V of kotlin.collections.MapAccessorsKt.setValue): kotlin.Unit [inline,operator] declared in kotlin.collections.MapAccessorsKt' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Int? + : kotlin.Int $receiver: GET_VAR 'val x$delegate: java.util.HashMap [val] declared in .test2' type=java.util.HashMap origin=null thisRef: CONST Null type=kotlin.Nothing? value=null - property: LOCAL_DELEGATED_PROPERTY_REFERENCE 'var x: @[FlexibleNullability] kotlin.Int? by (...)' delegate='val x$delegate: java.util.HashMap [val] declared in .test2' getter='local final fun (): @[FlexibleNullability] kotlin.Int? declared in .test2' setter='local final fun (: @[FlexibleNullability] kotlin.Int?): kotlin.Unit declared in .test2' type=kotlin.reflect.KMutableProperty0<@[FlexibleNullability] kotlin.Int?> origin=PROPERTY_REFERENCE_FOR_DELEGATE - value: GET_VAR ': @[FlexibleNullability] kotlin.Int? declared in .test2.' type=@[FlexibleNullability] kotlin.Int? origin=null - CALL 'local final fun (: @[FlexibleNullability] kotlin.Int?): kotlin.Unit declared in .test2' type=kotlin.Unit origin=EQ + property: LOCAL_DELEGATED_PROPERTY_REFERENCE 'var x: kotlin.Int by (...)' delegate='val x$delegate: java.util.HashMap [val] declared in .test2' getter='local final fun (): kotlin.Int declared in .test2' setter='local final fun (: kotlin.Int): kotlin.Unit declared in .test2' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE + value: GET_VAR ': kotlin.Int declared in .test2.' type=kotlin.Int origin=null + CALL 'local final fun (: kotlin.Int): kotlin.Unit declared in .test2' type=kotlin.Unit origin=EQ : CONST Int type=kotlin.Int value=0 - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:@[FlexibleNullability] kotlin.Int? [val] - CALL 'local final fun (): @[FlexibleNullability] kotlin.Int? declared in .test2' type=@[FlexibleNullability] kotlin.Int? origin=GET_LOCAL_PROPERTY - CALL 'local final fun (: @[FlexibleNullability] kotlin.Int?): kotlin.Unit declared in .test2' type=kotlin.Unit origin=POSTFIX_INCR - : CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val tmp_0: @[FlexibleNullability] kotlin.Int? [val] declared in .test2' type=@[FlexibleNullability] kotlin.Int? origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - GET_VAR 'val tmp_0: @[FlexibleNullability] kotlin.Int? [val] declared in .test2' type=@[FlexibleNullability] kotlin.Int? origin=null - CALL 'local final fun (: @[FlexibleNullability] kotlin.Int?): kotlin.Unit declared in .test2' type=kotlin.Unit origin=PLUSEQ + BLOCK type=kotlin.Int origin=POSTFIX_INCR + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val] + CALL 'local final fun (): kotlin.Int declared in .test2' type=kotlin.Int origin=GET_LOCAL_PROPERTY + CALL 'local final fun (: kotlin.Int): kotlin.Unit declared in .test2' type=kotlin.Unit origin=POSTFIX_INCR + : CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_0: kotlin.Int [val] declared in .test2' type=kotlin.Int origin=null + GET_VAR 'val tmp_0: kotlin.Int [val] declared in .test2' type=kotlin.Int origin=null + CALL 'local final fun (: kotlin.Int): kotlin.Unit declared in .test2' type=kotlin.Unit origin=PLUSEQ : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'local final fun (): @[FlexibleNullability] kotlin.Int? declared in .test2' type=@[FlexibleNullability] kotlin.Int? origin=GET_LOCAL_PROPERTY + $this: CALL 'local final fun (): kotlin.Int declared in .test2' type=kotlin.Int origin=GET_LOCAL_PROPERTY other: CONST Int type=kotlin.Int value=1 diff --git a/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.kt.txt b/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.kt.txt index d90950396da..798ee45f1f1 100644 --- a/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.kt.txt @@ -12,18 +12,21 @@ fun test1() { } fun test2() { - var x: @FlexibleNullability Int? + var x: Int val x$delegate: HashMap = hashMapOf() - local get(): @FlexibleNullability Int? { - return x$delegate.getValue<@FlexibleNullability Int?, @FlexibleNullability Int?>(thisRef = null, property = ::x) + local get(): Int { + return x$delegate.getValue(thisRef = null, property = ::x) } - local set(: @FlexibleNullability Int?) { - x$delegate.setValue<@FlexibleNullability Int?>(thisRef = null, property = ::x, value = ) + local set(: Int) { + x$delegate.setValue(thisRef = null, property = ::x, value = ) } ( = 0) - val : @FlexibleNullability Int? = () - ( = .inc()) - /*~> Unit */ + { // BLOCK + val : Int = () + ( = .inc()) + + } /*~> Unit */ ( = ().plus(other = 1)) } + diff --git a/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.ir.txt b/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.ir.txt index 3a1900050f4..25469e28d1c 100644 --- a/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.ir.txt @@ -93,23 +93,23 @@ FILE fqName: fileName:/packageLevelProperties.kt CALL 'public final fun hashMapOf (): java.util.HashMap [inline] declared in kotlin.collections.MapsKt' type=java.util.HashMap origin=null : kotlin.String : kotlin.Int - FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:@[FlexibleNullability] kotlin.Int? + FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [delegated,var] BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): @[FlexibleNullability] kotlin.Int? declared in ' - CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): V1 of kotlin.collections.MapAccessorsKt.getValue [inline,operator] declared in kotlin.collections.MapAccessorsKt' type=@[FlexibleNullability] kotlin.Int? origin=null - : @[FlexibleNullability] kotlin.Int? - : @[FlexibleNullability] kotlin.Int? + RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' + CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): V1 of kotlin.collections.MapAccessorsKt.getValue [inline,operator] declared in kotlin.collections.MapAccessorsKt' type=kotlin.Int origin=null + : kotlin.Int + : kotlin.Int $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test8$delegate type:java.util.HashMap visibility:private [final,static]' type=java.util.HashMap origin=null thisRef: CONST Null type=kotlin.Nothing? value=null - property: PROPERTY_REFERENCE 'public final test8: @[FlexibleNullability] kotlin.Int? [delegated,var]' field=null getter='public final fun (): @[FlexibleNullability] kotlin.Int? declared in ' setter='public final fun (: @[FlexibleNullability] kotlin.Int?): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0<@[FlexibleNullability] kotlin.Int?> origin=PROPERTY_REFERENCE_FOR_DELEGATE - FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:@[FlexibleNullability] kotlin.Int?) returnType:kotlin.Unit + property: PROPERTY_REFERENCE 'public final test8: kotlin.Int [delegated,var]' field=null getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE + FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:kotlin.Int) returnType:kotlin.Unit correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [delegated,var] - VALUE_PARAMETER name: index:0 type:@[FlexibleNullability] kotlin.Int? + VALUE_PARAMETER name: index:0 type:kotlin.Int BLOCK_BODY CALL 'public final fun setValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>, value: V of kotlin.collections.MapAccessorsKt.setValue): kotlin.Unit [inline,operator] declared in kotlin.collections.MapAccessorsKt' type=kotlin.Unit origin=null - : @[FlexibleNullability] kotlin.Int? + : kotlin.Int $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test8$delegate type:java.util.HashMap visibility:private [final,static]' type=java.util.HashMap origin=null thisRef: CONST Null type=kotlin.Nothing? value=null - property: PROPERTY_REFERENCE 'public final test8: @[FlexibleNullability] kotlin.Int? [delegated,var]' field=null getter='public final fun (): @[FlexibleNullability] kotlin.Int? declared in ' setter='public final fun (: @[FlexibleNullability] kotlin.Int?): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0<@[FlexibleNullability] kotlin.Int?> origin=PROPERTY_REFERENCE_FOR_DELEGATE - value: GET_VAR ': @[FlexibleNullability] kotlin.Int? declared in .' type=@[FlexibleNullability] kotlin.Int? origin=null + property: PROPERTY_REFERENCE 'public final test8: kotlin.Int [delegated,var]' field=null getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE + value: GET_VAR ': kotlin.Int declared in .' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.kt.txt b/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.kt.txt index beda2511539..3954fb504b2 100644 --- a/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.kt.txt @@ -37,11 +37,12 @@ val test7: Int /* by */ return #test7$delegate.getValue(thisRef = null, property = ::test7) } -var test8: @FlexibleNullability Int? /* by */ +var test8: Int /* by */ field = hashMapOf() - get(): @FlexibleNullability Int? { - return #test8$delegate.getValue<@FlexibleNullability Int?, @FlexibleNullability Int?>(thisRef = null, property = ::test8) + get(): Int { + return #test8$delegate.getValue(thisRef = null, property = ::test8) } - set(: @FlexibleNullability Int?) { - #test8$delegate.setValue<@FlexibleNullability Int?>(thisRef = null, property = ::test8, value = ) + set(: Int) { + #test8$delegate.setValue(thisRef = null, property = ::test8, value = ) } + diff --git a/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.fir.ir.txt b/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.fir.ir.txt index fa445d381f7..13431af5e14 100644 --- a/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.fir.ir.txt +++ b/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.fir.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 (p0: @[FlexibleNullability] K of java.util.HashMap?): V of java.util.HashMap? [operator] declared in java.util.HashMap' type=kotlin.Any? origin=null + CALL 'public open fun get (p0: @[EnhancedNullability] K of java.util.HashMap): V of java.util.HashMap? [operator] declared in java.util.HashMap' type=kotlin.Any? origin=null $this: CALL 'private final fun (): java.util.HashMap declared in ' type=java.util.HashMap origin=GET_PROPERTY p0: CALL 'public final fun (): java.lang.Class.PlatformExtensionsClashResolver> declared in .PlatformExtensionsClashResolver' type=java.lang.Class.PlatformSpecificExtension.PlatformSpecificExtension.PlatformSpecificExtension.PlatformSpecificExtension.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.fir.ir.txt b/compiler/testData/ir/irText/firProblems/MultiList.fir.ir.txt index 2977d2276bd..572afc61edb 100644 --- a/compiler/testData/ir/irText/firProblems/MultiList.fir.ir.txt +++ b/compiler/testData/ir/irText/firProblems/MultiList.fir.ir.txt @@ -196,51 +196,51 @@ FILE fqName: fileName:/MultiList.kt DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in java.util.ArrayList' : .Some.SomeList> INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:SomeList modality:OPEN visibility:public superTypes:[.MyList.SomeList>; java.util.ArrayList<.Some.SomeList>>]' - FUN FAKE_OVERRIDE name:contains visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] .Some.SomeList>?) returnType:kotlin.Boolean [fake_override,operator] + FUN FAKE_OVERRIDE name:contains visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:.Some.SomeList>) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun contains (p0: @[FlexibleNullability] E of java.util.ArrayList?): kotlin.Boolean [operator] declared in java.util.ArrayList + public open fun contains (p0: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Boolean [operator] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] .Some.SomeList>? + VALUE_PARAMETER name:p0 index:0 type:.Some.SomeList> FUN FAKE_OVERRIDE name:containsAll visibility:public modality:OPEN <> ($this:java.util.AbstractCollection, p0:kotlin.collections.Collection<@[FlexibleNullability] .Some.SomeList>?>) returnType:kotlin.Boolean [fake_override] overridden: public open fun containsAll (p0: 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 VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<@[FlexibleNullability] .Some.SomeList>?> - FUN FAKE_OVERRIDE name:get visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[FlexibleNullability] .Some.SomeList>? [fake_override,operator] + FUN FAKE_OVERRIDE name:get visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:.Some.SomeList> [fake_override,operator] overridden: - public open fun get (p0: kotlin.Int): @[FlexibleNullability] E of java.util.ArrayList? [operator] declared in java.util.ArrayList + public open fun get (p0: 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:p0 index:0 type:kotlin.Int - FUN FAKE_OVERRIDE name:indexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] .Some.SomeList>?) returnType:kotlin.Int [fake_override] + FUN FAKE_OVERRIDE name:indexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:.Some.SomeList>) returnType:kotlin.Int [fake_override] overridden: - public open fun indexOf (p0: @[FlexibleNullability] E of java.util.ArrayList?): kotlin.Int declared in java.util.ArrayList + public open fun indexOf (p0: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Int declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] .Some.SomeList>? + VALUE_PARAMETER name:p0 index:0 type:.Some.SomeList> 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 $this: VALUE_PARAMETER name: type:java.util.ArrayList - FUN FAKE_OVERRIDE name:iterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.collections.MutableIterator<@[FlexibleNullability] .Some.SomeList>?> [fake_override,operator] + FUN FAKE_OVERRIDE name:iterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.collections.MutableIterator<.Some.SomeList>> [fake_override,operator] overridden: - public open fun iterator (): @[EnhancedNullability] kotlin.collections.MutableIterator<@[FlexibleNullability] E of java.util.ArrayList?> [operator] declared in java.util.ArrayList + 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:lastIndexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] .Some.SomeList>?) returnType:kotlin.Int [fake_override] + FUN FAKE_OVERRIDE name:lastIndexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:.Some.SomeList>) returnType:kotlin.Int [fake_override] overridden: - public open fun lastIndexOf (p0: @[FlexibleNullability] E of java.util.ArrayList?): kotlin.Int declared in java.util.ArrayList + public open fun lastIndexOf (p0: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Int declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] .Some.SomeList>? - FUN FAKE_OVERRIDE name:listIterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.collections.MutableListIterator<@[FlexibleNullability] .Some.SomeList>?> [fake_override] + VALUE_PARAMETER name:p0 index:0 type:.Some.SomeList> + FUN FAKE_OVERRIDE name:listIterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.collections.MutableListIterator<.Some.SomeList>> [fake_override] overridden: - public open fun listIterator (): @[EnhancedNullability] kotlin.collections.MutableListIterator<@[FlexibleNullability] E of java.util.ArrayList?> declared in java.util.ArrayList + public open fun listIterator (): @[EnhancedNullability] kotlin.collections.MutableListIterator<@[EnhancedNullability] E of java.util.ArrayList> declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - FUN FAKE_OVERRIDE name:listIterator visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[EnhancedNullability] kotlin.collections.MutableListIterator<@[FlexibleNullability] .Some.SomeList>?> [fake_override] + FUN FAKE_OVERRIDE name:listIterator visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[EnhancedNullability] kotlin.collections.MutableListIterator<.Some.SomeList>> [fake_override] overridden: - public open fun listIterator (p0: kotlin.Int): @[EnhancedNullability] kotlin.collections.MutableListIterator<@[FlexibleNullability] E of java.util.ArrayList?> declared in java.util.ArrayList + public open fun listIterator (p0: kotlin.Int): @[EnhancedNullability] kotlin.collections.MutableListIterator<@[EnhancedNullability] E of java.util.ArrayList> declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int - FUN FAKE_OVERRIDE name:subList visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:kotlin.Int) returnType:@[EnhancedNullability] kotlin.collections.MutableList<@[FlexibleNullability] .Some.SomeList>?> [fake_override] + FUN FAKE_OVERRIDE name:subList visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:kotlin.Int) returnType:@[EnhancedNullability] kotlin.collections.MutableList<.Some.SomeList>> [fake_override] overridden: - public open fun subList (p0: kotlin.Int, p1: kotlin.Int): @[EnhancedNullability] kotlin.collections.MutableList<@[FlexibleNullability] E of java.util.ArrayList?> declared in java.util.ArrayList + public open fun subList (p0: kotlin.Int, p1: kotlin.Int): @[EnhancedNullability] kotlin.collections.MutableList<@[EnhancedNullability] E of java.util.ArrayList> declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int VALUE_PARAMETER name:p1 index:1 type:kotlin.Int @@ -310,77 +310,77 @@ FILE fqName: fileName:/MultiList.kt TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] kotlin.Array.SomeList.toArray?>? - FUN FAKE_OVERRIDE name:set visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[FlexibleNullability] .Some.SomeList>?) returnType:@[FlexibleNullability] .Some.SomeList>? [fake_override,operator] + FUN FAKE_OVERRIDE name:set visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:.Some.SomeList>) returnType:.Some.SomeList> [fake_override,operator] overridden: - public open fun set (p0: kotlin.Int, p1: @[FlexibleNullability] E of java.util.ArrayList?): @[FlexibleNullability] E of java.util.ArrayList? [operator] declared in java.util.ArrayList + public open fun set (p0: kotlin.Int, p1: @[EnhancedNullability] E of java.util.ArrayList): @[EnhancedNullability] E of java.util.ArrayList [operator] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int - VALUE_PARAMETER name:p1 index:1 type:@[FlexibleNullability] .Some.SomeList>? - FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] .Some.SomeList>?) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:p1 index:1 type:.Some.SomeList> + FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:.Some.SomeList>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun add (p0: @[FlexibleNullability] E of java.util.ArrayList?): kotlin.Boolean declared in java.util.ArrayList + public open fun add (p0: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] .Some.SomeList>? - FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[FlexibleNullability] .Some.SomeList>?) returnType:kotlin.Unit [fake_override] + VALUE_PARAMETER name:p0 index:0 type:.Some.SomeList> + FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:.Some.SomeList>) returnType:kotlin.Unit [fake_override] overridden: - public open fun add (p0: kotlin.Int, p1: @[FlexibleNullability] E of java.util.ArrayList?): kotlin.Unit declared in java.util.ArrayList + public open fun add (p0: kotlin.Int, p1: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Unit declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int - VALUE_PARAMETER name:p1 index:1 type:@[FlexibleNullability] .Some.SomeList>? - FUN FAKE_OVERRIDE name:remove visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] .Some.SomeList>?) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:p1 index:1 type:.Some.SomeList> + FUN FAKE_OVERRIDE name:remove visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:.Some.SomeList>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun remove (p0: @[FlexibleNullability] E of java.util.ArrayList?): kotlin.Boolean declared in java.util.ArrayList + public open fun remove (p0: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] .Some.SomeList>? + VALUE_PARAMETER name:p0 index:0 type:.Some.SomeList> FUN FAKE_OVERRIDE name:clear visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Unit [fake_override] overridden: public open fun clear (): kotlin.Unit declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>?>) returnType:kotlin.Boolean [fake_override] + FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun addAll (p0: @[EnhancedNullability] kotlin.collections.Collection): kotlin.Boolean declared in java.util.ArrayList + public open fun addAll (p0: @[EnhancedNullability] kotlin.collections.Collection): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>?> - FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>?>) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>> + FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun addAll (p0: kotlin.Int, p1: @[EnhancedNullability] kotlin.collections.Collection): kotlin.Boolean declared in java.util.ArrayList + public open fun addAll (p0: kotlin.Int, p1: @[EnhancedNullability] kotlin.collections.Collection): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int - VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>?> + VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>> FUN FAKE_OVERRIDE name:removeRange visibility:protected/*protected and package*/ modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:kotlin.Int) returnType:kotlin.Unit [fake_override] overridden: protected/*protected and package*/ open fun removeRange (p0: kotlin.Int, p1: kotlin.Int): kotlin.Unit declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int VALUE_PARAMETER name:p1 index:1 type:kotlin.Int - FUN FAKE_OVERRIDE name:removeAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<@[FlexibleNullability] .Some.SomeList>?>) returnType:kotlin.Boolean [fake_override] + FUN FAKE_OVERRIDE name:removeAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<.Some.SomeList>>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun removeAll (p0: kotlin.collections.Collection<@[FlexibleNullability] E of java.util.ArrayList?>): kotlin.Boolean declared in java.util.ArrayList + public open fun removeAll (p0: kotlin.collections.Collection<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<@[FlexibleNullability] .Some.SomeList>?> - FUN FAKE_OVERRIDE name:retainAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<@[FlexibleNullability] .Some.SomeList>?>) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<.Some.SomeList>> + FUN FAKE_OVERRIDE name:retainAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<.Some.SomeList>>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun retainAll (p0: kotlin.collections.Collection<@[FlexibleNullability] E of java.util.ArrayList?>): kotlin.Boolean declared in java.util.ArrayList + public open fun retainAll (p0: kotlin.collections.Collection<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<@[FlexibleNullability] .Some.SomeList>?> - FUN FAKE_OVERRIDE name:removeIf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] java.util.function.Predicate.Some.SomeList>?>) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<.Some.SomeList>> + FUN FAKE_OVERRIDE name:removeIf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] java.util.function.Predicate.Some.SomeList>>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun removeIf (p0: @[EnhancedNullability] java.util.function.Predicate): kotlin.Boolean declared in java.util.ArrayList + public open fun removeIf (p0: @[EnhancedNullability] java.util.function.Predicate): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.Predicate.Some.SomeList>?> - FUN FAKE_OVERRIDE name:replaceAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] java.util.function.UnaryOperator<@[FlexibleNullability] .Some.SomeList>?>) returnType:kotlin.Unit [fake_override] + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.Predicate.Some.SomeList>> + FUN FAKE_OVERRIDE name:replaceAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] java.util.function.UnaryOperator<.Some.SomeList>>) returnType:kotlin.Unit [fake_override] overridden: - public open fun replaceAll (p0: @[EnhancedNullability] java.util.function.UnaryOperator<@[FlexibleNullability] E of java.util.ArrayList?>): kotlin.Unit declared in java.util.ArrayList + public open fun replaceAll (p0: @[EnhancedNullability] java.util.function.UnaryOperator<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Unit declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.UnaryOperator<@[FlexibleNullability] .Some.SomeList>?> + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.UnaryOperator<.Some.SomeList>> FUN FAKE_OVERRIDE name:sort visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] java.util.Comparator.Some.SomeList>?>?) returnType:kotlin.Unit [fake_override] overridden: public open fun sort (p0: @[FlexibleNullability] java.util.Comparator?): kotlin.Unit declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.Comparator.Some.SomeList>?>? - FUN FAKE_OVERRIDE name:removeAt visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[FlexibleNullability] .Some.SomeList>? [fake_override] + FUN FAKE_OVERRIDE name:removeAt visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:.Some.SomeList> [fake_override] overridden: - public open fun removeAt (p0: kotlin.Int): @[FlexibleNullability] E of java.util.ArrayList? declared in java.util.ArrayList + public open fun removeAt (p0: kotlin.Int): @[EnhancedNullability] E of java.util.ArrayList declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int CLASS CLASS name:FinalList modality:FINAL visibility:public superTypes:[.SomeList] @@ -390,51 +390,51 @@ FILE fqName: fileName:/MultiList.kt DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .SomeList' : kotlin.String INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:FinalList modality:FINAL visibility:public superTypes:[.SomeList]' - FUN FAKE_OVERRIDE name:contains visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] .Some?) returnType:kotlin.Boolean [fake_override,operator] + FUN FAKE_OVERRIDE name:contains visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:.Some) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun contains (p0: @[FlexibleNullability] .Some.SomeList>?): kotlin.Boolean [fake_override,operator] declared in .SomeList + public open fun contains (p0: .Some.SomeList>): kotlin.Boolean [fake_override,operator] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] .Some? + VALUE_PARAMETER name:p0 index:0 type:.Some FUN FAKE_OVERRIDE name:containsAll visibility:public modality:OPEN <> ($this:java.util.AbstractCollection, p0:kotlin.collections.Collection<@[FlexibleNullability] .Some?>) returnType:kotlin.Boolean [fake_override] overridden: public open fun containsAll (p0: kotlin.collections.Collection<@[FlexibleNullability] .Some.SomeList>?>): kotlin.Boolean [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.AbstractCollection VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<@[FlexibleNullability] .Some?> - FUN FAKE_OVERRIDE name:get visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[FlexibleNullability] .Some? [fake_override,operator] + FUN FAKE_OVERRIDE name:get visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:.Some [fake_override,operator] overridden: - public open fun get (p0: kotlin.Int): @[FlexibleNullability] .Some.SomeList>? [fake_override,operator] declared in .SomeList + public open fun get (p0: kotlin.Int): .Some.SomeList> [fake_override,operator] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int - FUN FAKE_OVERRIDE name:indexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] .Some?) returnType:kotlin.Int [fake_override] + FUN FAKE_OVERRIDE name:indexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:.Some) returnType:kotlin.Int [fake_override] overridden: - public open fun indexOf (p0: @[FlexibleNullability] .Some.SomeList>?): kotlin.Int [fake_override] declared in .SomeList + public open fun indexOf (p0: .Some.SomeList>): kotlin.Int [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] .Some? + VALUE_PARAMETER name:p0 index:0 type:.Some 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 [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - FUN FAKE_OVERRIDE name:iterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.collections.MutableIterator<@[FlexibleNullability] .Some?> [fake_override,operator] + FUN FAKE_OVERRIDE name:iterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.collections.MutableIterator<.Some> [fake_override,operator] overridden: - public open fun iterator (): @[EnhancedNullability] kotlin.collections.MutableIterator<@[FlexibleNullability] .Some.SomeList>?> [fake_override,operator] declared in .SomeList + public open fun iterator (): @[EnhancedNullability] kotlin.collections.MutableIterator<.Some.SomeList>> [fake_override,operator] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - FUN FAKE_OVERRIDE name:lastIndexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] .Some?) returnType:kotlin.Int [fake_override] + FUN FAKE_OVERRIDE name:lastIndexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:.Some) returnType:kotlin.Int [fake_override] overridden: - public open fun lastIndexOf (p0: @[FlexibleNullability] .Some.SomeList>?): kotlin.Int [fake_override] declared in .SomeList + public open fun lastIndexOf (p0: .Some.SomeList>): kotlin.Int [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] .Some? - FUN FAKE_OVERRIDE name:listIterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.collections.MutableListIterator<@[FlexibleNullability] .Some?> [fake_override] + VALUE_PARAMETER name:p0 index:0 type:.Some + FUN FAKE_OVERRIDE name:listIterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.collections.MutableListIterator<.Some> [fake_override] overridden: - public open fun listIterator (): @[EnhancedNullability] kotlin.collections.MutableListIterator<@[FlexibleNullability] .Some.SomeList>?> [fake_override] declared in .SomeList + public open fun listIterator (): @[EnhancedNullability] kotlin.collections.MutableListIterator<.Some.SomeList>> [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - FUN FAKE_OVERRIDE name:listIterator visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[EnhancedNullability] kotlin.collections.MutableListIterator<@[FlexibleNullability] .Some?> [fake_override] + FUN FAKE_OVERRIDE name:listIterator visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[EnhancedNullability] kotlin.collections.MutableListIterator<.Some> [fake_override] overridden: - public open fun listIterator (p0: kotlin.Int): @[EnhancedNullability] kotlin.collections.MutableListIterator<@[FlexibleNullability] .Some.SomeList>?> [fake_override] declared in .SomeList + public open fun listIterator (p0: kotlin.Int): @[EnhancedNullability] kotlin.collections.MutableListIterator<.Some.SomeList>> [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int - FUN FAKE_OVERRIDE name:subList visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:kotlin.Int) returnType:@[EnhancedNullability] kotlin.collections.MutableList<@[FlexibleNullability] .Some?> [fake_override] + FUN FAKE_OVERRIDE name:subList visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:kotlin.Int) returnType:@[EnhancedNullability] kotlin.collections.MutableList<.Some> [fake_override] overridden: - public open fun subList (p0: kotlin.Int, p1: kotlin.Int): @[EnhancedNullability] kotlin.collections.MutableList<@[FlexibleNullability] .Some.SomeList>?> [fake_override] declared in .SomeList + public open fun subList (p0: kotlin.Int, p1: kotlin.Int): @[EnhancedNullability] kotlin.collections.MutableList<.Some.SomeList>> [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int VALUE_PARAMETER name:p1 index:1 type:kotlin.Int @@ -504,76 +504,76 @@ FILE fqName: fileName:/MultiList.kt TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] kotlin.Array.FinalList.toArray?>? - FUN FAKE_OVERRIDE name:set visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[FlexibleNullability] .Some?) returnType:@[FlexibleNullability] .Some? [fake_override,operator] + FUN FAKE_OVERRIDE name:set visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:.Some) returnType:.Some [fake_override,operator] overridden: - public open fun set (p0: kotlin.Int, p1: @[FlexibleNullability] .Some.SomeList>?): @[FlexibleNullability] .Some.SomeList>? [fake_override,operator] declared in .SomeList + public open fun set (p0: kotlin.Int, p1: .Some.SomeList>): .Some.SomeList> [fake_override,operator] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int - VALUE_PARAMETER name:p1 index:1 type:@[FlexibleNullability] .Some? - FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] .Some?) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:p1 index:1 type:.Some + FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:.Some) returnType:kotlin.Boolean [fake_override] overridden: - public open fun add (p0: @[FlexibleNullability] .Some.SomeList>?): kotlin.Boolean [fake_override] declared in .SomeList + public open fun add (p0: .Some.SomeList>): kotlin.Boolean [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] .Some? - FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[FlexibleNullability] .Some?) returnType:kotlin.Unit [fake_override] + VALUE_PARAMETER name:p0 index:0 type:.Some + FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:.Some) returnType:kotlin.Unit [fake_override] overridden: - public open fun add (p0: kotlin.Int, p1: @[FlexibleNullability] .Some.SomeList>?): kotlin.Unit [fake_override] declared in .SomeList + public open fun add (p0: kotlin.Int, p1: .Some.SomeList>): kotlin.Unit [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int - VALUE_PARAMETER name:p1 index:1 type:@[FlexibleNullability] .Some? - FUN FAKE_OVERRIDE name:remove visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] .Some?) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:p1 index:1 type:.Some + FUN FAKE_OVERRIDE name:remove visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:.Some) returnType:kotlin.Boolean [fake_override] overridden: - public open fun remove (p0: @[FlexibleNullability] .Some.SomeList>?): kotlin.Boolean [fake_override] declared in .SomeList + public open fun remove (p0: .Some.SomeList>): kotlin.Boolean [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] .Some? + VALUE_PARAMETER name:p0 index:0 type:.Some FUN FAKE_OVERRIDE name:clear visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Unit [fake_override] overridden: public open fun clear (): kotlin.Unit [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] kotlin.collections.Collection.Some?>) returnType:kotlin.Boolean [fake_override] + FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] kotlin.collections.Collection.Some>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun addAll (p0: @[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>?>): kotlin.Boolean [fake_override] declared in .SomeList + public open fun addAll (p0: @[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>>): kotlin.Boolean [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] kotlin.collections.Collection.Some?> - FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[EnhancedNullability] kotlin.collections.Collection.Some?>) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] kotlin.collections.Collection.Some> + FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[EnhancedNullability] kotlin.collections.Collection.Some>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun addAll (p0: kotlin.Int, p1: @[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>?>): kotlin.Boolean [fake_override] declared in .SomeList + public open fun addAll (p0: kotlin.Int, p1: @[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>>): kotlin.Boolean [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int - VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] kotlin.collections.Collection.Some?> + VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] kotlin.collections.Collection.Some> FUN FAKE_OVERRIDE name:removeRange visibility:protected/*protected and package*/ modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:kotlin.Int) returnType:kotlin.Unit [fake_override] overridden: protected/*protected and package*/ open fun removeRange (p0: kotlin.Int, p1: kotlin.Int): kotlin.Unit [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int VALUE_PARAMETER name:p1 index:1 type:kotlin.Int - FUN FAKE_OVERRIDE name:removeAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<@[FlexibleNullability] .Some?>) returnType:kotlin.Boolean [fake_override] + FUN FAKE_OVERRIDE name:removeAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<.Some>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun removeAll (p0: kotlin.collections.Collection<@[FlexibleNullability] .Some.SomeList>?>): kotlin.Boolean [fake_override] declared in .SomeList + public open fun removeAll (p0: kotlin.collections.Collection<.Some.SomeList>>): kotlin.Boolean [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<@[FlexibleNullability] .Some?> - FUN FAKE_OVERRIDE name:retainAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<@[FlexibleNullability] .Some?>) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<.Some> + FUN FAKE_OVERRIDE name:retainAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<.Some>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun retainAll (p0: kotlin.collections.Collection<@[FlexibleNullability] .Some.SomeList>?>): kotlin.Boolean [fake_override] declared in .SomeList + public open fun retainAll (p0: kotlin.collections.Collection<.Some.SomeList>>): kotlin.Boolean [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<@[FlexibleNullability] .Some?> - FUN FAKE_OVERRIDE name:removeIf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] java.util.function.Predicate.Some?>) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<.Some> + FUN FAKE_OVERRIDE name:removeIf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] java.util.function.Predicate.Some>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun removeIf (p0: @[EnhancedNullability] java.util.function.Predicate.Some.SomeList>?>): kotlin.Boolean [fake_override] declared in .SomeList + public open fun removeIf (p0: @[EnhancedNullability] java.util.function.Predicate.Some.SomeList>>): kotlin.Boolean [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.Predicate.Some?> - FUN FAKE_OVERRIDE name:replaceAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] java.util.function.UnaryOperator<@[FlexibleNullability] .Some?>) returnType:kotlin.Unit [fake_override] + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.Predicate.Some> + FUN FAKE_OVERRIDE name:replaceAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] java.util.function.UnaryOperator<.Some>) returnType:kotlin.Unit [fake_override] overridden: - public open fun replaceAll (p0: @[EnhancedNullability] java.util.function.UnaryOperator<@[FlexibleNullability] .Some.SomeList>?>): kotlin.Unit [fake_override] declared in .SomeList + public open fun replaceAll (p0: @[EnhancedNullability] java.util.function.UnaryOperator<.Some.SomeList>>): kotlin.Unit [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.UnaryOperator<@[FlexibleNullability] .Some?> + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.UnaryOperator<.Some> FUN FAKE_OVERRIDE name:sort visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] java.util.Comparator.Some?>?) returnType:kotlin.Unit [fake_override] overridden: public open fun sort (p0: @[FlexibleNullability] java.util.Comparator.Some.SomeList>?>?): kotlin.Unit [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.Comparator.Some?>? - FUN FAKE_OVERRIDE name:removeAt visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[FlexibleNullability] .Some? [fake_override] + FUN FAKE_OVERRIDE name:removeAt visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:.Some [fake_override] overridden: - public open fun removeAt (p0: kotlin.Int): @[FlexibleNullability] .Some.SomeList>? [fake_override] declared in .SomeList + public open fun removeAt (p0: kotlin.Int): .Some.SomeList> [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/Kt3302.fir.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/Kt3302.fir.txt index 0e7be06b7fa..f56c57623ba 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/Kt3302.fir.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/Kt3302.fir.txt @@ -6,7 +6,7 @@ public abstract interface Kt3302 : R|kotlin/Any| { } public abstract interface BasicBSONObject : R|test/Kt3302.LinkedHashMap, ft>|, R|test/Kt3302.BSONObject| { - @R|java/lang/Override|() public abstract fun put(key: R|ft|, value: R|ft|): R|ft| + @R|java/lang/Override|() public abstract fun put(key: R|@EnhancedNullability kotlin/String|, value: R|@EnhancedNullability kotlin/Any|): R|ft| } public abstract interface LinkedHashMap|, V : R|ft|> : R|kotlin/Any| { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java index cfe53ecf4d4..0a974a5628d 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java @@ -17345,6 +17345,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/j+k/protectedStaticSamePackage.kt"); } + @Test + @TestMetadata("purelyImplementedSupertype.kt") + public void testPurelyImplementedSupertype() throws Exception { + runTest("compiler/testData/diagnostics/tests/j+k/purelyImplementedSupertype.kt"); + } + @Test @TestMetadata("rawOverride.kt") public void testRawOverride() throws Exception {