From 9f27362ee1d5d974f7d566e2b2ced8707e9e640d Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Mon, 22 Mar 2021 16:13:27 +0300 Subject: [PATCH] Match triangle & diamond intersections in FirTypeIntersectionScope --- ...TouchedTilContractsPhaseTestGenerated.java | 15 ++ .../problems/doubleGenericDiamond.fir.txt | 41 +++++ .../resolve/problems/doubleGenericDiamond.kt | 22 +++ .../problems/falseIntersection.fir.txt | 17 ++ .../resolve/problems/falseIntersection.kt | 10 ++ .../resolve/problems/transform.fir.txt | 160 ++++++++++++++++++ .../testData/resolve/problems/transform.kt | 90 ++++++++++ .../kotlinOverridesJavaComplex.fir.txt | 4 +- .../runners/FirDiagnosticTestGenerated.java | 18 ++ ...DiagnosticsWithLightTreeTestGenerated.java | 18 ++ .../scopes/impl/FirTypeIntersectionScope.kt | 67 ++++++-- .../irText/classes/enumClassModality.fir.txt | 27 ++- .../inlineCollectionOfInlineClass.fir.txt | 10 +- .../ir/irText/expressions/kt30020.fir.txt | 4 +- .../firProblems/AbstractMutableMap.fir.txt | 85 +++++----- .../DelegationAndInheritanceFromJava.fir.txt | 20 +-- .../firProblems/ImplicitReceiverStack.fir.txt | 3 - .../ir/irText/firProblems/MultiList.fir.txt | 137 +++++++-------- .../memberScopeByFqName/MutableList.kt | 18 +- 19 files changed, 590 insertions(+), 176 deletions(-) create mode 100644 compiler/fir/analysis-tests/testData/resolve/problems/doubleGenericDiamond.fir.txt create mode 100644 compiler/fir/analysis-tests/testData/resolve/problems/doubleGenericDiamond.kt create mode 100644 compiler/fir/analysis-tests/testData/resolve/problems/falseIntersection.fir.txt create mode 100644 compiler/fir/analysis-tests/testData/resolve/problems/falseIntersection.kt create mode 100644 compiler/fir/analysis-tests/testData/resolve/problems/transform.fir.txt create mode 100644 compiler/fir/analysis-tests/testData/resolve/problems/transform.kt diff --git a/compiler/fir/analysis-tests/legacy-fir-tests/tests-gen/org/jetbrains/kotlin/fir/LazyBodyIsNotTouchedTilContractsPhaseTestGenerated.java b/compiler/fir/analysis-tests/legacy-fir-tests/tests-gen/org/jetbrains/kotlin/fir/LazyBodyIsNotTouchedTilContractsPhaseTestGenerated.java index f1192a0bd3b..1f080a88bde 100644 --- a/compiler/fir/analysis-tests/legacy-fir-tests/tests-gen/org/jetbrains/kotlin/fir/LazyBodyIsNotTouchedTilContractsPhaseTestGenerated.java +++ b/compiler/fir/analysis-tests/legacy-fir-tests/tests-gen/org/jetbrains/kotlin/fir/LazyBodyIsNotTouchedTilContractsPhaseTestGenerated.java @@ -2651,6 +2651,16 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract runTest("compiler/fir/analysis-tests/testData/resolve/problems/definitelyNotNullAndOriginalType.kt"); } + @TestMetadata("doubleGenericDiamond.kt") + public void testDoubleGenericDiamond() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/problems/doubleGenericDiamond.kt"); + } + + @TestMetadata("falseIntersection.kt") + public void testFalseIntersection() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/problems/falseIntersection.kt"); + } + @TestMetadata("flexibleTypeVarAgainstNull.kt") public void testFlexibleTypeVarAgainstNull() throws Exception { runTest("compiler/fir/analysis-tests/testData/resolve/problems/flexibleTypeVarAgainstNull.kt"); @@ -2705,6 +2715,11 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract public void testSecondaryConstructorCfg() throws Exception { runTest("compiler/fir/analysis-tests/testData/resolve/problems/secondaryConstructorCfg.kt"); } + + @TestMetadata("transform.kt") + public void testTransform() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/problems/transform.kt"); + } } @TestMetadata("compiler/fir/analysis-tests/testData/resolve/properties") diff --git a/compiler/fir/analysis-tests/testData/resolve/problems/doubleGenericDiamond.fir.txt b/compiler/fir/analysis-tests/testData/resolve/problems/doubleGenericDiamond.fir.txt new file mode 100644 index 00000000000..b1ed24802ce --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/problems/doubleGenericDiamond.fir.txt @@ -0,0 +1,41 @@ +FILE: doubleGenericDiamond.kt + public abstract interface Left : R|kotlin/Any| { + } + public abstract interface Right : R|kotlin/Any| { + } + public final class Bottom : R|Left|, R|Right| { + public constructor(): R|Bottom| { + super() + } + + } + public abstract interface A : R|kotlin/Any| { + public open fun f(): R|T?| { + ^f Null(null) + } + + } + public abstract interface B : R|A| { + public open override fun f(): R|T?| { + ^f Null(null) + } + + } + public abstract class C : R|A| { + public constructor(): R|C| { + super() + } + + } + public abstract class D : R|C| { + public constructor(): R|D| { + super|>() + } + + } + public final class Z : R|D|, R|B| { + public constructor(): R|Z| { + super|>() + } + + } diff --git a/compiler/fir/analysis-tests/testData/resolve/problems/doubleGenericDiamond.kt b/compiler/fir/analysis-tests/testData/resolve/problems/doubleGenericDiamond.kt new file mode 100644 index 00000000000..4aa96e91fb7 --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/problems/doubleGenericDiamond.kt @@ -0,0 +1,22 @@ +interface Left +interface Right +class Bottom : Left, Right + +interface A { + fun f(): T? { + return null + } +} + +interface B : A { + override fun f(): T? { + return null + } +} + +abstract class C : A + +abstract class D : C() + +// We should not have intersection override f() in this class +class Z : D(), B \ No newline at end of file diff --git a/compiler/fir/analysis-tests/testData/resolve/problems/falseIntersection.fir.txt b/compiler/fir/analysis-tests/testData/resolve/problems/falseIntersection.fir.txt new file mode 100644 index 00000000000..84a34cde21c --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/problems/falseIntersection.fir.txt @@ -0,0 +1,17 @@ +FILE: falseIntersection.kt + public abstract interface A : R|kotlin/Any| { + public open fun foo(): R|kotlin/Unit| { + } + + } + public abstract interface B : R|A| { + public open override fun foo(): R|kotlin/Unit| { + } + + } + public final class C : R|B|, R|A| { + public constructor(): R|C| { + super() + } + + } diff --git a/compiler/fir/analysis-tests/testData/resolve/problems/falseIntersection.kt b/compiler/fir/analysis-tests/testData/resolve/problems/falseIntersection.kt new file mode 100644 index 00000000000..dcc717bd1f8 --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/problems/falseIntersection.kt @@ -0,0 +1,10 @@ +interface A { + fun foo() {} +} + +interface B : A { + override fun foo() {} +} + +// We should not have intersection override foo() in this class +class C : B, A diff --git a/compiler/fir/analysis-tests/testData/resolve/problems/transform.fir.txt b/compiler/fir/analysis-tests/testData/resolve/problems/transform.fir.txt new file mode 100644 index 00000000000..a95e3750381 --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/problems/transform.fir.txt @@ -0,0 +1,160 @@ +FILE: transform.kt + public sealed class CompositeTransformResult : R|kotlin/Any| { + protected constructor(): R|CompositeTransformResult| { + super() + } + + public final class Single : R|CompositeTransformResult| { + public constructor(_single: R|T|): R|CompositeTransformResult.Single| { + super|>() + } + + public final val _single: R|T| = R|/_single| + public get(): R|T| + + } + + public final class Multiple : R|CompositeTransformResult| { + public constructor(_list: R|kotlin/collections/List|): R|CompositeTransformResult.Multiple| { + super|>() + } + + public final val _list: R|kotlin/collections/List| = R|/_list| + public get(): R|kotlin/collections/List| + + } + + public final companion object Companion : R|kotlin/Any| { + private constructor(): R|CompositeTransformResult.Companion| { + super() + } + + public final fun single(t: R|T|): R|CompositeTransformResult.Single| { + ^single R|SubstitutionOverride|(R|/t|) + } + + public final fun many(l: R|kotlin/collections/List|): R|CompositeTransformResult.Multiple| { + ^many R|SubstitutionOverride|(R|/l|) + } + + } + + public final val single: R|T| + public get(): R|T| { + ^ ((this@R|/CompositeTransformResult| as R|CompositeTransformResult.Single<*>|).R|SubstitutionOverride| as R|T|) + } + + } + public abstract interface FirElement : R|kotlin/Any| { + public abstract fun accept(visitor: R|FirVisitor|, data: R|D|): R|R| + + public open fun accept(visitor: R|FirVisitorVoid|): R|kotlin/Unit| { + ^accept this@R|/FirElement|.R|/FirElement.accept|(R|/visitor|, Null(null)) + } + + public abstract fun transform(visitor: R|FirTransformer|, data: R|D|): R|CompositeTransformResult| + + } + public abstract class FirVisitor : R|kotlin/Any| { + public constructor(): R|FirVisitor| { + super() + } + + } + public abstract class FirVisitorVoid : R|FirVisitor| { + public constructor(): R|FirVisitorVoid| { + super|>() + } + + } + public abstract class FirTransformer : R|FirVisitor, D>| { + public constructor(): R|FirTransformer| { + super, D>|>() + } + + } + public abstract interface FirAnnotationContainer : R|FirElement| { + public abstract override fun accept(visitor: R|FirVisitor|, data: R|D|): R|R| + + } + public abstract interface FirStatement : R|FirAnnotationContainer| { + public abstract override fun accept(visitor: R|FirVisitor|, data: R|D|): R|R| + + } + public abstract interface FirTypeParameterRefsOwner : R|FirElement| { + public abstract override fun accept(visitor: R|FirVisitor|, data: R|D|): R|R| + + } + public abstract interface FirDeclaration : R|FirElement| { + public abstract override fun accept(visitor: R|FirVisitor|, data: R|D|): R|R| + + } + public abstract interface FirAnnotatedDeclaration : R|FirDeclaration|, R|FirAnnotationContainer| { + public abstract override fun accept(visitor: R|FirVisitor|, data: R|D|): R|R| + + } + public abstract interface FirSymbolOwner|, R|FirDeclaration|> : R|FirElement| { + public abstract override fun accept(visitor: R|FirVisitor|, data: R|D|): R|R| + + } + public abstract interface FirClassLikeDeclaration|> : R|FirAnnotatedDeclaration|, R|FirStatement|, R|FirSymbolOwner| { + } + public abstract interface FirClass|> : R|FirClassLikeDeclaration|, R|FirStatement|, R|FirTypeParameterRefsOwner| { + } + private final class FirApplySupertypesTransformer : R|FirTransformer| { + public constructor(): R|FirApplySupertypesTransformer| { + super|>() + } + + } + public final fun |> R|F|.runSupertypeResolvePhaseForLocalClass(): R|F| { + lval applySupertypesTransformer: R|FirApplySupertypesTransformer| = R|/FirApplySupertypesTransformer.FirApplySupertypesTransformer|() + ^runSupertypeResolvePhaseForLocalClass this@R|/runSupertypeResolvePhaseForLocalClass|.R|SubstitutionOverride|>|(R|/applySupertypesTransformer|, Null(null)).R|SubstitutionOverride| + } + public abstract class FirPureAbstractElement : R|FirElement| { + public constructor(): R|FirPureAbstractElement| { + super() + } + + } + public abstract interface FirTypedDeclaration : R|FirAnnotatedDeclaration| { + public abstract override fun accept(visitor: R|FirVisitor|, data: R|D|): R|R| + + } + public abstract interface FirCallableDeclaration|> : R|FirTypedDeclaration|, R|FirSymbolOwner| { + public abstract override fun accept(visitor: R|FirVisitor|, data: R|D|): R|R| + + } + public abstract class FirVariable|> : R|FirPureAbstractElement|, R|FirCallableDeclaration|, R|FirAnnotatedDeclaration|, R|FirStatement| { + public constructor|>(): R|FirVariable| { + super() + } + + public abstract override fun accept(visitor: R|FirVisitor|, data: R|D|): R|R| + + } + public abstract class FirWhenExpression : R|kotlin/Any| { + public constructor(): R|FirWhenExpression| { + super() + } + + public abstract val subjectVariable: R|FirVariable<*>?| + public get(): R|FirVariable<*>?| + + } + public final class FirRenderer : R|FirVisitorVoid| { + public constructor(): R|FirRenderer| { + super() + } + + public final fun foo(expression: R|FirWhenExpression|): R|kotlin/Unit| { + lval variable: R|FirVariable<*>?| = R|/expression|.R|/FirWhenExpression.subjectVariable| + when () { + !=(R|/variable|, Null(null)) -> { + R|/variable|.R|/FirElement.accept|(this@R|/FirRenderer|) + } + } + + } + + } diff --git a/compiler/fir/analysis-tests/testData/resolve/problems/transform.kt b/compiler/fir/analysis-tests/testData/resolve/problems/transform.kt new file mode 100644 index 00000000000..bb9f322949b --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/problems/transform.kt @@ -0,0 +1,90 @@ +sealed class CompositeTransformResult { + + class Single(val _single: T) : CompositeTransformResult() + + class Multiple(val _list: List) : CompositeTransformResult() + + companion object { + fun single(t: T) = Single(t) + fun many(l: List) = Multiple(l) + } + + val single: T + get() = (this as Single<*>)._single as T +} + +interface FirElement { + fun accept(visitor: FirVisitor, data: D): R + + fun accept(visitor: FirVisitorVoid) = accept(visitor, null) + + fun transform(visitor: FirTransformer, data: D): CompositeTransformResult +} + +abstract class FirVisitor + +abstract class FirVisitorVoid : FirVisitor() + +abstract class FirTransformer : FirVisitor, D>() + +interface FirAnnotationContainer : FirElement { + abstract override fun accept(visitor: FirVisitor, data: D): R +} + +interface FirStatement : FirAnnotationContainer { + abstract override fun accept(visitor: FirVisitor, data: D): R +} + +interface FirTypeParameterRefsOwner : FirElement { + abstract override fun accept(visitor: FirVisitor, data: D): R +} + +interface FirDeclaration : FirElement { + abstract override fun accept(visitor: FirVisitor, data: D): R +} + +interface FirAnnotatedDeclaration : FirDeclaration, FirAnnotationContainer { + abstract override fun accept(visitor: FirVisitor, data: D): R +} + +interface FirSymbolOwner : FirElement where E : FirSymbolOwner, E : FirDeclaration { + abstract override fun accept(visitor: FirVisitor, data: D): R +} + +interface FirClassLikeDeclaration> : FirAnnotatedDeclaration, FirStatement, FirSymbolOwner + +interface FirClass> : FirClassLikeDeclaration, FirStatement, FirTypeParameterRefsOwner + +private class FirApplySupertypesTransformer() : FirTransformer() + +fun > F.runSupertypeResolvePhaseForLocalClass(): F { + val applySupertypesTransformer = FirApplySupertypesTransformer() + return this.transform(applySupertypesTransformer, null).single +} + +abstract class FirPureAbstractElement : FirElement + +interface FirTypedDeclaration : FirAnnotatedDeclaration { + abstract override fun accept(visitor: FirVisitor, data: D): R +} + +interface FirCallableDeclaration> : FirTypedDeclaration, FirSymbolOwner { + abstract override fun accept(visitor: FirVisitor, data: D): R +} + +abstract class FirVariable> : FirPureAbstractElement(), FirCallableDeclaration, FirAnnotatedDeclaration, FirStatement { + abstract override fun accept(visitor: FirVisitor, data: D): R +} + +abstract class FirWhenExpression { + abstract val subjectVariable: FirVariable<*>? +} + +class FirRenderer : FirVisitorVoid() { + fun foo(expression: FirWhenExpression) { + val variable = expression.subjectVariable + if (variable != null) { + variable.accept(this) + } + } +} diff --git a/compiler/fir/analysis-tests/testData/resolve/properties/kotlinOverridesJavaComplex.fir.txt b/compiler/fir/analysis-tests/testData/resolve/properties/kotlinOverridesJavaComplex.fir.txt index 08d7447a131..2f3d3dbf770 100644 --- a/compiler/fir/analysis-tests/testData/resolve/properties/kotlinOverridesJavaComplex.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/properties/kotlinOverridesJavaComplex.fir.txt @@ -23,7 +23,7 @@ FILE: Test.kt } public final fun test(): R|kotlin/String| { - ^test this@R|/LightClassWrapper|.R|/LightClassWrapper.typeParameters|.R|/single|() + ^test this@R|/LightClassWrapper|.R|/Light.typeParameters|.R|/single|() } } @@ -47,7 +47,7 @@ FILE: Test.kt public final fun test(other: R|kotlin/Any?|): R|kotlin/Unit| { when () { (R|/other| is R|LightField<*>|) -> { - R|/other|.R|/LightField.name| + R|/other|.R|/LightMember.name| } } diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticTestGenerated.java index e0d99f58352..913341cf950 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticTestGenerated.java @@ -2999,6 +2999,18 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { runTest("compiler/fir/analysis-tests/testData/resolve/problems/definitelyNotNullAndOriginalType.kt"); } + @Test + @TestMetadata("doubleGenericDiamond.kt") + public void testDoubleGenericDiamond() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/problems/doubleGenericDiamond.kt"); + } + + @Test + @TestMetadata("falseIntersection.kt") + public void testFalseIntersection() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/problems/falseIntersection.kt"); + } + @Test @TestMetadata("flexibleTypeVarAgainstNull.kt") public void testFlexibleTypeVarAgainstNull() throws Exception { @@ -3064,6 +3076,12 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { public void testSecondaryConstructorCfg() throws Exception { runTest("compiler/fir/analysis-tests/testData/resolve/problems/secondaryConstructorCfg.kt"); } + + @Test + @TestMetadata("transform.kt") + public void testTransform() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/problems/transform.kt"); + } } @Nested diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticsWithLightTreeTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticsWithLightTreeTestGenerated.java index 3dded846424..1411df75b37 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticsWithLightTreeTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticsWithLightTreeTestGenerated.java @@ -3033,6 +3033,18 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos runTest("compiler/fir/analysis-tests/testData/resolve/problems/definitelyNotNullAndOriginalType.kt"); } + @Test + @TestMetadata("doubleGenericDiamond.kt") + public void testDoubleGenericDiamond() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/problems/doubleGenericDiamond.kt"); + } + + @Test + @TestMetadata("falseIntersection.kt") + public void testFalseIntersection() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/problems/falseIntersection.kt"); + } + @Test @TestMetadata("flexibleTypeVarAgainstNull.kt") public void testFlexibleTypeVarAgainstNull() throws Exception { @@ -3098,6 +3110,12 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos public void testSecondaryConstructorCfg() throws Exception { runTest("compiler/fir/analysis-tests/testData/resolve/problems/secondaryConstructorCfg.kt"); } + + @Test + @TestMetadata("transform.kt") + public void testTransform() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/problems/transform.kt"); + } } @Nested diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScope.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScope.kt index 66aa4ced34a..ff5ddbe9124 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScope.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScope.kt @@ -8,15 +8,12 @@ package org.jetbrains.kotlin.fir.scopes.impl import org.jetbrains.kotlin.descriptors.Modality import org.jetbrains.kotlin.descriptors.Visibilities import org.jetbrains.kotlin.descriptors.Visibility -import org.jetbrains.kotlin.fir.FirSession +import org.jetbrains.kotlin.fir.* import org.jetbrains.kotlin.fir.declarations.* -import org.jetbrains.kotlin.fir.dispatchReceiverClassOrNull -import org.jetbrains.kotlin.fir.originalForIntersectionOverrideAttr import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor import org.jetbrains.kotlin.fir.scopes.* import org.jetbrains.kotlin.name.CallableId import org.jetbrains.kotlin.fir.symbols.impl.* -import org.jetbrains.kotlin.fir.typeContext import org.jetbrains.kotlin.fir.types.* import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.types.AbstractTypeChecker @@ -94,15 +91,15 @@ class FirTypeIntersectionScope private constructor( members.map { MemberWithBaseScope(it, scope) } } - while (allMembersWithScope.isNotEmpty()) { + while (allMembersWithScope.size > 1) { val maxByVisibility = findMemberWithMaxVisibility(allMembersWithScope) val extractBothWaysWithPrivate = extractBothWaysOverridable(maxByVisibility, allMembersWithScope) - val extractedOverrides = extractBothWaysWithPrivate.filterNot { + val extractedOverrides = extractBothWaysWithPrivate.filterNotTo(mutableListOf()) { Visibilities.isPrivate((it.member.fir as FirMemberDeclaration).visibility) }.takeIf { it.isNotEmpty() } ?: extractBothWaysWithPrivate - - val (mostSpecific, scopeForMostSpecific) = selectMostSpecificMember(extractedOverrides) - if (extractedOverrides.size > 1) { + val baseMembersForIntersection = extractedOverrides.calcBaseMembersForIntersectionOverride() + if (baseMembersForIntersection.size > 1) { + val (mostSpecific, scopeForMostSpecific) = selectMostSpecificMember(baseMembersForIntersection) val intersectionOverride = intersectionOverrides.getOrPut(mostSpecific) { val newModality = chooseIntersectionOverrideModality(extractedOverrides) val newVisibility = chooseIntersectionVisibility(extractedOverrides) @@ -124,14 +121,64 @@ class FirTypeIntersectionScope private constructor( @Suppress("UNCHECKED_CAST") processor(intersectionOverride.member as D) } else { + val mostSpecific = baseMembersForIntersection.single().member overriddenSymbols[mostSpecific] = extractedOverrides processor(mostSpecific) } } + if (allMembersWithScope.isNotEmpty()) { + val single = allMembersWithScope.single().member + overriddenSymbols[single] = allMembersWithScope.toList() + processor(single) + } + return true } + private inline fun > D.unwrapSubstitutionOverrides(): D { + var current = this + + do { + val next = current.originalForSubstitutionOverride ?: return current + current = next + } while (true) + } + + private fun > + MutableList>.calcBaseMembersForIntersectionOverride(): List> { + if (size == 1) return this + val unwrappedMemberSet = mutableSetOf>() + for ((member, scope) in this) { + @Suppress("UNCHECKED_CAST") + unwrappedMemberSet += MemberWithBaseScope(member.fir.unwrapSubstitutionOverrides().symbol as S, scope) + } + // If in fact extracted overrides are the same symbols, + // we should just take most specific member without creating intersection + // A typical sample here is inheritance of the same class in different places of hierarchy + if (unwrappedMemberSet.size == 1) { + return listOf(selectMostSpecificMember(this)) + } + + val baseMembers = mutableSetOf() + for ((unwrappedMember, scope) in unwrappedMemberSet) { + @Suppress("UNCHECKED_CAST") + if (unwrappedMember is FirNamedFunctionSymbol) { + scope.processOverriddenFunctions(unwrappedMember) { + baseMembers += it.fir.unwrapSubstitutionOverrides().symbol as S + ProcessorAction.NEXT + } + } else if (unwrappedMember is FirPropertySymbol) { + scope.processOverriddenProperties(unwrappedMember) { + baseMembers += it.fir.unwrapSubstitutionOverrides().symbol as S + ProcessorAction.NEXT + } + } + } + removeIf { (member, _) -> member.fir.unwrapSubstitutionOverrides().symbol in baseMembers } + return this + } + private fun > chooseIntersectionOverrideModality( extractedOverridden: Collection> ): Modality? { @@ -397,7 +444,7 @@ class FirTypeIntersectionScope private constructor( private fun > extractBothWaysOverridable( overrider: MemberWithBaseScope, members: MutableCollection> - ): Collection> { + ): MutableList> { val result = mutableListOf>().apply { add(overrider) } val iterator = members.iterator() diff --git a/compiler/testData/ir/irText/classes/enumClassModality.fir.txt b/compiler/testData/ir/irText/classes/enumClassModality.fir.txt index a2025cff398..da8cc7348d5 100644 --- a/compiler/testData/ir/irText/classes/enumClassModality.fir.txt +++ b/compiler/testData/ir/irText/classes/enumClassModality.fir.txt @@ -485,19 +485,19 @@ FILE fqName: fileName:/enumClassModality.kt public abstract fun foo (): kotlin.Unit [fake_override] declared in .TestAbstractEnum2 $this: VALUE_PARAMETER name: type:.TestAbstractEnum2.X1 BLOCK_BODY - FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in .TestAbstractEnum2 - $this: VALUE_PARAMETER name: type:kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Enum VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Int [fake_override] overridden: public final fun hashCode (): kotlin.Int [fake_override] declared in .TestAbstractEnum2 - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum) returnType:kotlin.String [fake_override] overridden: public open fun toString (): kotlin.String [fake_override] declared in .TestAbstractEnum2 - $this: VALUE_PARAMETER name: type:kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Enum FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any [fake_override] overridden: protected final fun clone (): kotlin.Any [fake_override] declared in .TestAbstractEnum2 @@ -528,22 +528,19 @@ FILE fqName: fileName:/enumClassModality.kt overridden: public abstract fun foo (): kotlin.Unit declared in .IFoo $this: VALUE_PARAMETER name: type:.IFoo - FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in .IFoo public final fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Enum VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Int [fake_override] overridden: - public open fun hashCode (): kotlin.Int [fake_override] declared in .IFoo public final fun hashCode (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum) returnType:kotlin.String [fake_override] overridden: - public open fun toString (): kotlin.String [fake_override] declared in .IFoo public open fun toString (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Enum FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any [fake_override] overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum diff --git a/compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.fir.txt b/compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.fir.txt index 29cacc42a47..f956029e21f 100644 --- a/compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.fir.txt +++ b/compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.fir.txt @@ -88,17 +88,16 @@ FILE fqName: fileName:/inlineCollectionOfInlineClass.kt correspondingProperty: PROPERTY name:size visibility:public modality:FINAL [val] overridden: public abstract fun (): kotlin.Int declared in kotlin.collections.Set - public abstract fun (): kotlin.Int declared in kotlin.collections.Collection - public abstract fun (): kotlin.Int [fake_override] declared in kotlin.collections.MutableSet $this: VALUE_PARAMETER name: type:.InlineMutableSet BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .InlineMutableSet' - CALL 'public abstract fun (): kotlin.Int [fake_override] declared in kotlin.collections.MutableSet' type=kotlin.Int origin=GET_PROPERTY + CALL 'public abstract fun (): kotlin.Int declared in kotlin.collections.Set' type=kotlin.Int origin=GET_PROPERTY $this: CALL 'private final fun (): kotlin.collections.MutableSet<.IT> declared in .InlineMutableSet' type=kotlin.collections.MutableSet<.IT> origin=GET_PROPERTY $this: GET_VAR ': .InlineMutableSet declared in .InlineMutableSet.' type=.InlineMutableSet origin=null FUN name:contains visibility:public modality:FINAL <> ($this:.InlineMutableSet, element:.IT) returnType:kotlin.Boolean [operator] overridden: public abstract fun contains (element: E of kotlin.collections.MutableSet): kotlin.Boolean [fake_override,operator] declared in kotlin.collections.MutableSet + public abstract fun contains (element: E of kotlin.collections.Set): kotlin.Boolean [operator] declared in kotlin.collections.Set $this: VALUE_PARAMETER name: type:.InlineMutableSet VALUE_PARAMETER name:element index:0 type:.IT BLOCK_BODY @@ -110,6 +109,7 @@ FILE fqName: fileName:/inlineCollectionOfInlineClass.kt FUN name:containsAll visibility:public modality:FINAL <> ($this:.InlineMutableSet, elements:kotlin.collections.Collection<.IT>) returnType:kotlin.Boolean overridden: public abstract fun containsAll (elements: kotlin.collections.Collection): kotlin.Boolean [fake_override] declared in kotlin.collections.MutableSet + public abstract fun containsAll (elements: kotlin.collections.Collection): kotlin.Boolean declared in kotlin.collections.Set $this: VALUE_PARAMETER name: type:.InlineMutableSet VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<.IT> BLOCK_BODY @@ -121,12 +121,10 @@ FILE fqName: fileName:/inlineCollectionOfInlineClass.kt FUN name:isEmpty visibility:public modality:FINAL <> ($this:.InlineMutableSet) returnType:kotlin.Boolean overridden: public abstract fun isEmpty (): kotlin.Boolean declared in kotlin.collections.Set - public abstract fun isEmpty (): kotlin.Boolean declared in kotlin.collections.Collection - public abstract fun isEmpty (): kotlin.Boolean [fake_override] declared in kotlin.collections.MutableSet $this: VALUE_PARAMETER name: type:.InlineMutableSet BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun isEmpty (): kotlin.Boolean declared in .InlineMutableSet' - CALL 'public abstract fun isEmpty (): kotlin.Boolean [fake_override] declared in kotlin.collections.MutableSet' type=kotlin.Boolean origin=null + CALL 'public abstract fun isEmpty (): kotlin.Boolean declared in kotlin.collections.Set' type=kotlin.Boolean origin=null $this: CALL 'private final fun (): kotlin.collections.MutableSet<.IT> declared in .InlineMutableSet' type=kotlin.collections.MutableSet<.IT> origin=GET_PROPERTY $this: GET_VAR ': .InlineMutableSet declared in .InlineMutableSet.isEmpty' type=.InlineMutableSet origin=null FUN name:add visibility:public modality:FINAL <> ($this:.InlineMutableSet, element:.IT) returnType:kotlin.Boolean diff --git a/compiler/testData/ir/irText/expressions/kt30020.fir.txt b/compiler/testData/ir/irText/expressions/kt30020.fir.txt index 0c4f918e191..258c356a9c7 100644 --- a/compiler/testData/ir/irText/expressions/kt30020.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt30020.fir.txt @@ -218,7 +218,7 @@ FILE fqName: fileName:/kt30020.kt VALUE_PARAMETER name:element index:0 type:kotlin.Int FUN FAKE_OVERRIDE name:isEmpty visibility:public modality:ABSTRACT <> ($this:kotlin.collections.List) returnType:kotlin.Boolean [fake_override] overridden: - public abstract fun isEmpty (): kotlin.Boolean [fake_override] declared in kotlin.collections.MutableList + public abstract fun isEmpty (): kotlin.Boolean declared in kotlin.collections.List $this: VALUE_PARAMETER name: type:kotlin.collections.List FUN FAKE_OVERRIDE name:iterator visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableCollection) returnType:kotlin.collections.MutableIterator [fake_override,operator] overridden: @@ -233,7 +233,7 @@ FILE fqName: fileName:/kt30020.kt FUN FAKE_OVERRIDE name: visibility:public modality:ABSTRACT <> ($this:kotlin.collections.List) returnType:kotlin.Int [fake_override] correspondingProperty: PROPERTY FAKE_OVERRIDE name:size visibility:public modality:ABSTRACT [fake_override,val] overridden: - public abstract fun (): kotlin.Int [fake_override] declared in kotlin.collections.MutableList + public abstract fun (): kotlin.Int declared in kotlin.collections.List $this: VALUE_PARAMETER name: type:kotlin.collections.List FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: diff --git a/compiler/testData/ir/irText/firProblems/AbstractMutableMap.fir.txt b/compiler/testData/ir/irText/firProblems/AbstractMutableMap.fir.txt index d0ac736ffbb..1a2afee01f0 100644 --- a/compiler/testData/ir/irText/firProblems/AbstractMutableMap.fir.txt +++ b/compiler/testData/ir/irText/firProblems/AbstractMutableMap.fir.txt @@ -23,26 +23,27 @@ FILE fqName: fileName:/AbstractMutableMap.kt FUN name: visibility:public modality:FINAL <> ($this:.MyMap.MyMap, V of .MyMap>) returnType:kotlin.collections.MutableSet.MyMap, V of .MyMap>> correspondingProperty: PROPERTY name:entries visibility:public modality:FINAL [val] overridden: - public abstract fun (): kotlin.collections.MutableSet> [fake_override] declared in kotlin.collections.AbstractMutableMap + public abstract fun (): @[FlexibleNullability] kotlin.collections.Set<@[FlexibleNullability] kotlin.collections.Map.Entry<@[FlexibleNullability] K of kotlin.collections.AbstractMutableMap?, @[FlexibleNullability] V of kotlin.collections.AbstractMutableMap?>?>? [fake_override] declared in kotlin.collections.AbstractMutableMap + public abstract fun (): @[FlexibleNullability] kotlin.collections.Set<@[FlexibleNullability] kotlin.collections.Map.Entry<@[FlexibleNullability] K of java.util.AbstractMap?, @[FlexibleNullability] V of java.util.AbstractMap?>?>? declared in java.util.AbstractMap $this: VALUE_PARAMETER name: type:.MyMap.MyMap, V of .MyMap> BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.collections.MutableSet.MyMap, V of .MyMap>> declared in .MyMap' CALL 'public final fun mutableSetOf (): kotlin.collections.MutableSet [inline] declared in kotlin.collections.SetsKt' type=kotlin.collections.MutableSet.MyMap, V of .MyMap>> origin=null : kotlin.collections.MutableMap.MutableEntry.MyMap, V of .MyMap> - FUN FAKE_OVERRIDE name:clear visibility:public modality:OPEN <> ($this:kotlin.collections.MutableMap) returnType:kotlin.Unit [fake_override] + FUN FAKE_OVERRIDE name:clear visibility:public modality:OPEN <> ($this:java.util.AbstractMap) returnType:kotlin.Unit [fake_override] overridden: public open fun clear (): kotlin.Unit [fake_override] declared in kotlin.collections.AbstractMutableMap - $this: VALUE_PARAMETER name: type:kotlin.collections.MutableMap - FUN FAKE_OVERRIDE name:putAll visibility:public modality:OPEN <> ($this:kotlin.collections.MutableMap, from:kotlin.collections.Map.MyMap, V of .MyMap>) returnType:kotlin.Unit [fake_override] + $this: VALUE_PARAMETER name: type:java.util.AbstractMap + FUN FAKE_OVERRIDE name:putAll visibility:public modality:OPEN <> ($this:java.util.AbstractMap, p0:@[EnhancedNullability] kotlin.collections.Map.MyMap?, out @[FlexibleNullability] V of .MyMap?>) returnType:kotlin.Unit [fake_override] overridden: - public open fun putAll (from: kotlin.collections.Map): kotlin.Unit [fake_override] declared in kotlin.collections.AbstractMutableMap - $this: VALUE_PARAMETER name: type:kotlin.collections.MutableMap - VALUE_PARAMETER name:from index:0 type:kotlin.collections.Map.MyMap, V of .MyMap> - FUN FAKE_OVERRIDE name:remove visibility:public modality:OPEN <> ($this:kotlin.collections.MutableMap, key:K of .MyMap) returnType:V of .MyMap? [fake_override] + public open fun putAll (p0: @[EnhancedNullability] kotlin.collections.Map): kotlin.Unit [fake_override] declared in kotlin.collections.AbstractMutableMap + $this: VALUE_PARAMETER name: type:java.util.AbstractMap + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] kotlin.collections.Map.MyMap?, out @[FlexibleNullability] V of .MyMap?> + FUN FAKE_OVERRIDE name:remove visibility:public modality:OPEN <> ($this:java.util.AbstractMap, p0:@[FlexibleNullability] K of .MyMap?) returnType:V of .MyMap? [fake_override] overridden: - public open fun remove (key: K of kotlin.collections.AbstractMutableMap): V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap - $this: VALUE_PARAMETER name: type:kotlin.collections.MutableMap - VALUE_PARAMETER name:key index:0 type:K of .MyMap + public open fun remove (p0: @[FlexibleNullability] K of kotlin.collections.AbstractMutableMap?): V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap + $this: VALUE_PARAMETER name: type:java.util.AbstractMap + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] K of .MyMap? FUN FAKE_OVERRIDE name:remove visibility:public modality:OPEN <> ($this:kotlin.collections.MutableMap, key:K of .MyMap, value:V of .MyMap) returnType:kotlin.Boolean [fake_override] annotations: SinceKotlin(version = '1.1') @@ -53,17 +54,17 @@ FILE fqName: fileName:/AbstractMutableMap.kt VALUE_PARAMETER name:key index:0 type:K of .MyMap VALUE_PARAMETER name:value index:1 type:V of .MyMap PROPERTY FAKE_OVERRIDE name:keys visibility:public modality:OPEN [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:OPEN <> ($this:kotlin.collections.MutableMap) returnType:kotlin.collections.MutableSet.MyMap> [fake_override] + FUN FAKE_OVERRIDE name: visibility:public modality:OPEN <> ($this:java.util.AbstractMap) returnType:@[FlexibleNullability] kotlin.collections.Set<@[FlexibleNullability] K of .MyMap?>? [fake_override] correspondingProperty: PROPERTY FAKE_OVERRIDE name:keys visibility:public modality:OPEN [fake_override,val] overridden: - public open fun (): kotlin.collections.MutableSet [fake_override] declared in kotlin.collections.AbstractMutableMap - $this: VALUE_PARAMETER name: type:kotlin.collections.MutableMap + public open fun (): @[FlexibleNullability] kotlin.collections.Set<@[FlexibleNullability] K of kotlin.collections.AbstractMutableMap?>? [fake_override] declared in kotlin.collections.AbstractMutableMap + $this: VALUE_PARAMETER name: type:java.util.AbstractMap PROPERTY FAKE_OVERRIDE name:values visibility:public modality:OPEN [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:OPEN <> ($this:kotlin.collections.MutableMap) returnType:kotlin.collections.MutableCollection.MyMap> [fake_override] + FUN FAKE_OVERRIDE name: visibility:public modality:OPEN <> ($this:java.util.AbstractMap) returnType:@[FlexibleNullability] kotlin.collections.Collection<@[FlexibleNullability] V of .MyMap?>? [fake_override] correspondingProperty: PROPERTY FAKE_OVERRIDE name:values visibility:public modality:OPEN [fake_override,val] overridden: - public open fun (): kotlin.collections.MutableCollection [fake_override] declared in kotlin.collections.AbstractMutableMap - $this: VALUE_PARAMETER name: type:kotlin.collections.MutableMap + public open fun (): @[FlexibleNullability] kotlin.collections.Collection<@[FlexibleNullability] V of kotlin.collections.AbstractMutableMap?>? [fake_override] declared in kotlin.collections.AbstractMutableMap + $this: VALUE_PARAMETER name: type:java.util.AbstractMap FUN FAKE_OVERRIDE name:replaceAll visibility:public modality:OPEN <> ($this:kotlin.collections.MutableMap, p0:@[EnhancedNullability] java.util.function.BiFunction.MyMap?, in @[FlexibleNullability] V of .MyMap?, out @[FlexibleNullability] V of .MyMap?>) returnType:kotlin.Unit [fake_override] overridden: public open fun replaceAll (p0: @[EnhancedNullability] java.util.function.BiFunction): kotlin.Unit [fake_override] declared in kotlin.collections.AbstractMutableMap @@ -113,21 +114,21 @@ FILE fqName: fileName:/AbstractMutableMap.kt $this: VALUE_PARAMETER name: type:kotlin.collections.MutableMap VALUE_PARAMETER name:p0 index:0 type:K of .MyMap VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] java.util.function.BiFunction.MyMap?, in @[FlexibleNullability] V of .MyMap?, out @[FlexibleNullability] V of .MyMap?> - FUN FAKE_OVERRIDE name:containsKey visibility:public modality:OPEN <> ($this:kotlin.collections.Map, key:K of .MyMap) returnType:kotlin.Boolean [fake_override] + FUN FAKE_OVERRIDE name:containsKey visibility:public modality:OPEN <> ($this:java.util.AbstractMap, p0:@[FlexibleNullability] K of .MyMap?) returnType:kotlin.Boolean [fake_override] overridden: - public open fun containsKey (key: K of kotlin.collections.AbstractMutableMap): kotlin.Boolean [fake_override] declared in kotlin.collections.AbstractMutableMap - $this: VALUE_PARAMETER name: type:kotlin.collections.Map - VALUE_PARAMETER name:key index:0 type:K of .MyMap - FUN FAKE_OVERRIDE name:containsValue visibility:public modality:OPEN <> ($this:kotlin.collections.Map, value:V of .MyMap) returnType:kotlin.Boolean [fake_override] + public open fun containsKey (p0: @[FlexibleNullability] K of kotlin.collections.AbstractMutableMap?): kotlin.Boolean [fake_override] declared in kotlin.collections.AbstractMutableMap + $this: VALUE_PARAMETER name: type:java.util.AbstractMap + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] K of .MyMap? + FUN FAKE_OVERRIDE name:containsValue visibility:public modality:OPEN <> ($this:java.util.AbstractMap, p0:@[FlexibleNullability] V of .MyMap?) returnType:kotlin.Boolean [fake_override] overridden: - public open fun containsValue (value: V of kotlin.collections.AbstractMutableMap): kotlin.Boolean [fake_override] declared in kotlin.collections.AbstractMutableMap - $this: VALUE_PARAMETER name: type:kotlin.collections.Map - VALUE_PARAMETER name:value index:0 type:V of .MyMap - FUN FAKE_OVERRIDE name:get visibility:public modality:OPEN <> ($this:kotlin.collections.Map, key:K of .MyMap) returnType:V of .MyMap? [fake_override,operator] + public open fun containsValue (p0: @[FlexibleNullability] V of kotlin.collections.AbstractMutableMap?): kotlin.Boolean [fake_override] declared in kotlin.collections.AbstractMutableMap + $this: VALUE_PARAMETER name: type:java.util.AbstractMap + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] V of .MyMap? + FUN FAKE_OVERRIDE name:get visibility:public modality:OPEN <> ($this:java.util.AbstractMap, p0:@[FlexibleNullability] K of .MyMap?) returnType:V of .MyMap? [fake_override,operator] overridden: - public open fun get (key: K of kotlin.collections.AbstractMutableMap): V of kotlin.collections.AbstractMutableMap? [fake_override,operator] declared in kotlin.collections.AbstractMutableMap - $this: VALUE_PARAMETER name: type:kotlin.collections.Map - VALUE_PARAMETER name:key index:0 type:K of .MyMap + public open fun get (p0: @[FlexibleNullability] K of kotlin.collections.AbstractMutableMap?): V of kotlin.collections.AbstractMutableMap? [fake_override,operator] declared in kotlin.collections.AbstractMutableMap + $this: VALUE_PARAMETER name: type:java.util.AbstractMap + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] K of .MyMap? FUN FAKE_OVERRIDE name:getOrDefault visibility:public modality:OPEN <> ($this:kotlin.collections.Map, key:K of .MyMap, defaultValue:V of .MyMap) returnType:V of .MyMap [fake_override] annotations: SinceKotlin(version = '1.1') @@ -137,34 +138,34 @@ FILE fqName: fileName:/AbstractMutableMap.kt $this: VALUE_PARAMETER name: type:kotlin.collections.Map VALUE_PARAMETER name:key index:0 type:K of .MyMap VALUE_PARAMETER name:defaultValue index:1 type:V of .MyMap - FUN FAKE_OVERRIDE name:isEmpty visibility:public modality:OPEN <> ($this:kotlin.collections.Map) returnType:kotlin.Boolean [fake_override] + FUN FAKE_OVERRIDE name:isEmpty visibility:public modality:OPEN <> ($this:java.util.AbstractMap) returnType:kotlin.Boolean [fake_override] overridden: public open fun isEmpty (): kotlin.Boolean [fake_override] declared in kotlin.collections.AbstractMutableMap - $this: VALUE_PARAMETER name: type:kotlin.collections.Map + $this: VALUE_PARAMETER name: type:java.util.AbstractMap PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:OPEN <> ($this:kotlin.collections.Map) returnType:kotlin.Int [fake_override] + FUN FAKE_OVERRIDE name: visibility:public modality:OPEN <> ($this:java.util.AbstractMap) returnType:kotlin.Int [fake_override] correspondingProperty: PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] overridden: public open fun (): kotlin.Int [fake_override] declared in kotlin.collections.AbstractMutableMap - $this: VALUE_PARAMETER name: type:kotlin.collections.Map + $this: VALUE_PARAMETER name: type:java.util.AbstractMap FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:kotlin.collections.Map, p0:@[EnhancedNullability] java.util.function.BiConsumer.MyMap?, in @[FlexibleNullability] V of .MyMap?>) returnType:kotlin.Unit [fake_override] overridden: public open fun forEach (p0: @[EnhancedNullability] java.util.function.BiConsumer): kotlin.Unit [fake_override] declared in kotlin.collections.AbstractMutableMap $this: VALUE_PARAMETER name: type:kotlin.collections.Map VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.BiConsumer.MyMap?, in @[FlexibleNullability] V of .MyMap?> - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:java.util.AbstractMap, p0:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.collections.AbstractMutableMap - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + public open fun equals (p0: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.collections.AbstractMutableMap + $this: VALUE_PARAMETER name: type:java.util.AbstractMap + VALUE_PARAMETER name:p0 index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:java.util.AbstractMap) returnType:kotlin.Int [fake_override] overridden: public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.collections.AbstractMutableMap - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + $this: VALUE_PARAMETER name: type:java.util.AbstractMap + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:java.util.AbstractMap) returnType:@[EnhancedNullability] kotlin.String [fake_override] overridden: - public open fun toString (): kotlin.String [fake_override] declared in kotlin.collections.AbstractMutableMap - $this: VALUE_PARAMETER name: type:kotlin.Any + public open fun toString (): @[EnhancedNullability] kotlin.String [fake_override] declared in kotlin.collections.AbstractMutableMap + $this: VALUE_PARAMETER name: type:java.util.AbstractMap FUN FAKE_OVERRIDE name:clone visibility:protected/*protected and package*/ modality:OPEN <> ($this:java.util.AbstractMap) returnType:@[FlexibleNullability] kotlin.Any? [fake_override] overridden: protected/*protected and package*/ open fun clone (): @[FlexibleNullability] kotlin.Any? [fake_override] declared in kotlin.collections.AbstractMutableMap diff --git a/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.txt b/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.txt index ca7152613f3..81ca2eb6b0a 100644 --- a/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.txt +++ b/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.txt @@ -8,7 +8,7 @@ FILE fqName: fileName:/DelegationAndInheritanceFromJava.kt INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Impl modality:FINAL visibility:public superTypes:[.Foo.A; .Foo.B]' FUN DELEGATED_MEMBER name:add visibility:public modality:OPEN <> ($this:.Impl, element:@[FlexibleNullability] kotlin.String?) returnType:kotlin.Boolean overridden: - public abstract fun add (element: @[FlexibleNullability] kotlin.String?): kotlin.Boolean [fake_override] declared in .Foo.A + public abstract fun add (element: @[FlexibleNullability] kotlin.String?): kotlin.Boolean [fake_override] declared in .Foo.B $this: VALUE_PARAMETER name: type:.Impl VALUE_PARAMETER name:element index:0 type:@[FlexibleNullability] kotlin.String? BLOCK_BODY @@ -19,7 +19,7 @@ FILE fqName: fileName:/DelegationAndInheritanceFromJava.kt element: GET_VAR 'element: @[FlexibleNullability] kotlin.String? declared in .Impl.add' type=@[FlexibleNullability] kotlin.String? origin=null FUN DELEGATED_MEMBER name:addAll visibility:public modality:OPEN <> ($this:.Impl, elements:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>) returnType:kotlin.Boolean overridden: - public abstract fun addAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean [fake_override] declared in .Foo.A + public abstract fun addAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean [fake_override] declared in .Foo.B $this: VALUE_PARAMETER name: type:.Impl VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> BLOCK_BODY @@ -39,7 +39,7 @@ FILE fqName: fileName:/DelegationAndInheritanceFromJava.kt receiver: GET_VAR ': .Impl declared in .Impl.clear' type=.Impl origin=null FUN DELEGATED_MEMBER name:iterator visibility:public modality:OPEN <> ($this:.Impl) returnType:kotlin.collections.MutableIterator<@[FlexibleNullability] kotlin.String?> [operator] overridden: - public abstract fun iterator (): kotlin.collections.MutableIterator<@[FlexibleNullability] kotlin.String?> [fake_override,operator] declared in .Foo.A + public abstract fun iterator (): kotlin.collections.MutableIterator<@[FlexibleNullability] kotlin.String?> [fake_override,operator] declared in .Foo.B $this: VALUE_PARAMETER name: type:.Impl BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun iterator (): kotlin.collections.MutableIterator<@[FlexibleNullability] kotlin.String?> [operator] declared in .Impl' @@ -48,7 +48,7 @@ FILE fqName: fileName:/DelegationAndInheritanceFromJava.kt receiver: GET_VAR ': .Impl declared in .Impl.iterator' type=.Impl origin=null FUN DELEGATED_MEMBER name:remove visibility:public modality:OPEN <> ($this:.Impl, element:@[FlexibleNullability] kotlin.String?) returnType:kotlin.Boolean overridden: - public abstract fun remove (element: @[FlexibleNullability] kotlin.String?): kotlin.Boolean [fake_override] declared in .Foo.A + public abstract fun remove (element: @[FlexibleNullability] kotlin.String?): kotlin.Boolean [fake_override] declared in .Foo.B $this: VALUE_PARAMETER name: type:.Impl VALUE_PARAMETER name:element index:0 type:@[FlexibleNullability] kotlin.String? BLOCK_BODY @@ -59,7 +59,7 @@ FILE fqName: fileName:/DelegationAndInheritanceFromJava.kt element: GET_VAR 'element: @[FlexibleNullability] kotlin.String? declared in .Impl.remove' type=@[FlexibleNullability] kotlin.String? origin=null FUN DELEGATED_MEMBER name:removeAll visibility:public modality:OPEN <> ($this:.Impl, elements:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>) returnType:kotlin.Boolean overridden: - public abstract fun removeAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean [fake_override] declared in .Foo.A + public abstract fun removeAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean [fake_override] declared in .Foo.B $this: VALUE_PARAMETER name: type:.Impl VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> BLOCK_BODY @@ -70,7 +70,7 @@ FILE fqName: fileName:/DelegationAndInheritanceFromJava.kt elements: GET_VAR 'elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> declared in .Impl.removeAll' type=kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> origin=null FUN DELEGATED_MEMBER name:retainAll visibility:public modality:OPEN <> ($this:.Impl, elements:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>) returnType:kotlin.Boolean overridden: - public abstract fun retainAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean [fake_override] declared in .Foo.A + public abstract fun retainAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean [fake_override] declared in .Foo.B $this: VALUE_PARAMETER name: type:.Impl VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> BLOCK_BODY @@ -81,7 +81,7 @@ FILE fqName: fileName:/DelegationAndInheritanceFromJava.kt elements: GET_VAR 'elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> declared in .Impl.retainAll' type=kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> origin=null FUN DELEGATED_MEMBER name:contains visibility:public modality:OPEN <> ($this:.Impl, element:@[FlexibleNullability] kotlin.String?) returnType:kotlin.Boolean [operator] overridden: - public abstract fun contains (element: @[FlexibleNullability] kotlin.String?): kotlin.Boolean [fake_override,operator] declared in .Foo.A + public abstract fun contains (element: @[FlexibleNullability] kotlin.String?): kotlin.Boolean [fake_override,operator] declared in .Foo.B $this: VALUE_PARAMETER name: type:.Impl VALUE_PARAMETER name:element index:0 type:@[FlexibleNullability] kotlin.String? BLOCK_BODY @@ -92,7 +92,7 @@ FILE fqName: fileName:/DelegationAndInheritanceFromJava.kt element: GET_VAR 'element: @[FlexibleNullability] kotlin.String? declared in .Impl.contains' type=@[FlexibleNullability] kotlin.String? origin=null FUN DELEGATED_MEMBER name:containsAll visibility:public modality:OPEN <> ($this:.Impl, elements:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>) returnType:kotlin.Boolean overridden: - public abstract fun containsAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean [fake_override] declared in .Foo.A + public abstract fun containsAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean [fake_override] declared in .Foo.B $this: VALUE_PARAMETER name: type:.Impl VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> BLOCK_BODY @@ -108,7 +108,7 @@ FILE fqName: fileName:/DelegationAndInheritanceFromJava.kt $this: VALUE_PARAMETER name: type:.Impl BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun isEmpty (): kotlin.Boolean declared in .Impl' - CALL 'public abstract fun isEmpty (): kotlin.Boolean [fake_override] declared in kotlin.collections.MutableSet' type=kotlin.Boolean origin=null + CALL 'public abstract fun isEmpty (): kotlin.Boolean declared in kotlin.collections.Set' type=kotlin.Boolean origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.Foo.B visibility:local [final]' type=.Foo.B origin=null receiver: GET_VAR ': .Impl declared in .Impl.isEmpty' type=.Impl origin=null PROPERTY DELEGATED_MEMBER name:size visibility:public modality:OPEN [val] @@ -120,7 +120,7 @@ FILE fqName: fileName:/DelegationAndInheritanceFromJava.kt $this: VALUE_PARAMETER name: type:.Impl BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun (): kotlin.Int declared in .Impl' - CALL 'public abstract fun (): kotlin.Int [fake_override] declared in kotlin.collections.MutableSet' type=kotlin.Int origin=null + CALL 'public abstract fun (): kotlin.Int declared in kotlin.collections.Set' type=kotlin.Int origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.Foo.B visibility:local [final]' type=.Foo.B origin=null receiver: GET_VAR ': .Impl declared in .Impl.' type=.Impl origin=null FIELD DELEGATE name:<$$delegate_0> type:.Foo.B visibility:local [final] diff --git a/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.fir.txt b/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.fir.txt index 90874e93b82..84ce5fca631 100644 --- a/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.fir.txt +++ b/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.fir.txt @@ -152,7 +152,6 @@ FILE fqName: fileName:/ImplicitReceiverStack.kt FUN name:iterator visibility:public modality:FINAL <> ($this:.PersistentImplicitReceiverStack) returnType:kotlin.collections.Iterator<.ImplicitReceiverValue<*>> [operator] overridden: public abstract fun iterator (): kotlin.collections.Iterator<.ImplicitReceiverValue<*>> [fake_override,operator] declared in .ImplicitReceiverStack - public abstract fun iterator (): kotlin.collections.Iterator [operator] declared in kotlin.collections.Iterable $this: VALUE_PARAMETER name: type:.PersistentImplicitReceiverStack BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun iterator (): kotlin.collections.Iterator<.ImplicitReceiverValue<*>> [operator] declared in .PersistentImplicitReceiverStack' @@ -173,13 +172,11 @@ FILE fqName: fileName:/ImplicitReceiverStack.kt FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:kotlin.collections.Iterable, p0:@[FlexibleNullability] java.util.function.Consumer.ImplicitReceiverValue<*>?>?) returnType:kotlin.Unit [fake_override] overridden: public open fun forEach (p0: @[FlexibleNullability] java.util.function.Consumer.ImplicitReceiverValue<*>?>?): kotlin.Unit [fake_override] declared in .ImplicitReceiverStack - public open fun forEach (p0: @[FlexibleNullability] java.util.function.Consumer?): kotlin.Unit declared in kotlin.collections.Iterable $this: VALUE_PARAMETER name: type:kotlin.collections.Iterable VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.function.Consumer.ImplicitReceiverValue<*>?>? FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:kotlin.collections.Iterable) returnType:@[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] .ImplicitReceiverValue<*>?> [fake_override] overridden: public open fun spliterator (): @[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] .ImplicitReceiverValue<*>?> [fake_override] declared in .ImplicitReceiverStack - public open fun spliterator (): @[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] T of kotlin.collections.Iterable?> declared in kotlin.collections.Iterable $this: VALUE_PARAMETER name: type:kotlin.collections.Iterable FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: diff --git a/compiler/testData/ir/irText/firProblems/MultiList.fir.txt b/compiler/testData/ir/irText/firProblems/MultiList.fir.txt index 533ad3e3175..0cbd1c8b838 100644 --- a/compiler/testData/ir/irText/firProblems/MultiList.fir.txt +++ b/compiler/testData/ir/irText/firProblems/MultiList.fir.txt @@ -194,108 +194,91 @@ 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:kotlin.collections.List, element:.Some.SomeList>) returnType:kotlin.Boolean [fake_override,operator] + FUN FAKE_OVERRIDE name:contains visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] .Some.SomeList>?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public abstract fun contains (element: .Some.MyList>): kotlin.Boolean [fake_override,operator] declared in .MyList public open fun contains (p0: @[FlexibleNullability] E of java.util.ArrayList?): kotlin.Boolean [operator] declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:kotlin.collections.List - VALUE_PARAMETER name:element index:0 type:.Some.SomeList> + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] .Some.SomeList>? FUN FAKE_OVERRIDE name:containsAll visibility:public modality:OPEN <> ($this:kotlin.collections.List, elements:kotlin.collections.Collection<.Some.SomeList>>) returnType:kotlin.Boolean [fake_override] overridden: public abstract fun containsAll (elements: kotlin.collections.Collection<.Some.MyList>>): kotlin.Boolean [fake_override] declared in .MyList public open fun containsAll (p0: kotlin.collections.Collection<@[FlexibleNullability] E of java.util.ArrayList?>): kotlin.Boolean [fake_override] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:kotlin.collections.List VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<.Some.SomeList>> - FUN FAKE_OVERRIDE name:get visibility:public modality:OPEN <> ($this:kotlin.collections.List, index:kotlin.Int) returnType:.Some.SomeList> [fake_override,operator] + FUN FAKE_OVERRIDE name:get visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[FlexibleNullability] .Some.SomeList>? [fake_override,operator] overridden: - public abstract fun get (index: kotlin.Int): .Some.MyList> [fake_override,operator] declared in .MyList public open fun get (p0: kotlin.Int): @[FlexibleNullability] E of java.util.ArrayList? [operator] declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:kotlin.collections.List - VALUE_PARAMETER name:index index:0 type:kotlin.Int - FUN FAKE_OVERRIDE name:indexOf visibility:public modality:OPEN <> ($this:kotlin.collections.List, element:.Some.SomeList>) returnType:kotlin.Int [fake_override] + $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] overridden: - public abstract fun indexOf (element: .Some.MyList>): kotlin.Int [fake_override] declared in .MyList public open fun indexOf (p0: @[FlexibleNullability] E of java.util.ArrayList?): kotlin.Int declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:kotlin.collections.List - VALUE_PARAMETER name:element index:0 type:.Some.SomeList> - FUN FAKE_OVERRIDE name:isEmpty visibility:public modality:OPEN <> ($this:kotlin.collections.List) returnType:kotlin.Boolean [fake_override] + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] .Some.SomeList>? + FUN FAKE_OVERRIDE name:isEmpty visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Boolean [fake_override] overridden: - public abstract fun isEmpty (): kotlin.Boolean [fake_override] declared in .MyList public open fun isEmpty (): kotlin.Boolean declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:kotlin.collections.List + $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] overridden: - public abstract fun iterator (): kotlin.collections.Iterator<.Some.MyList>> [fake_override,operator] declared in .MyList public open fun iterator (): @[EnhancedNullability] kotlin.collections.MutableIterator<@[FlexibleNullability] 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:kotlin.collections.List, element:.Some.SomeList>) returnType:kotlin.Int [fake_override] + FUN FAKE_OVERRIDE name:lastIndexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] .Some.SomeList>?) returnType:kotlin.Int [fake_override] overridden: - public abstract fun lastIndexOf (element: .Some.MyList>): kotlin.Int [fake_override] declared in .MyList public open fun lastIndexOf (p0: @[FlexibleNullability] E of java.util.ArrayList?): kotlin.Int declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:kotlin.collections.List - VALUE_PARAMETER name:element index:0 type:.Some.SomeList> + $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] overridden: - public abstract fun listIterator (): kotlin.collections.ListIterator<.Some.MyList>> [fake_override] declared in .MyList public open fun listIterator (): @[EnhancedNullability] kotlin.collections.MutableListIterator<@[FlexibleNullability] 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] overridden: - public abstract fun listIterator (index: kotlin.Int): kotlin.collections.ListIterator<.Some.MyList>> [fake_override] declared in .MyList public open fun listIterator (p0: kotlin.Int): @[EnhancedNullability] kotlin.collections.MutableListIterator<@[FlexibleNullability] 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] overridden: - public abstract fun subList (fromIndex: kotlin.Int, toIndex: kotlin.Int): kotlin.collections.List<.Some.MyList>> [fake_override] declared in .MyList 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 $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 PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:OPEN <> ($this:kotlin.collections.List) returnType:kotlin.Int [fake_override] + FUN FAKE_OVERRIDE name: visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Int [fake_override] correspondingProperty: PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] overridden: - public abstract fun (): kotlin.Int [fake_override] declared in .MyList public open fun (): kotlin.Int declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:kotlin.collections.List - FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:kotlin.collections.Collection) returnType:@[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] .Some.SomeList>?> [fake_override] + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] .Some.SomeList>?> [fake_override] overridden: - public open fun spliterator (): @[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] .Some.MyList>?> [fake_override] declared in .MyList public open fun spliterator (): @[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] E of java.util.ArrayList?> declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:kotlin.collections.Collection + $this: VALUE_PARAMETER name: type:java.util.ArrayList FUN FAKE_OVERRIDE name:parallelStream visibility:public modality:OPEN <> ($this:kotlin.collections.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[FlexibleNullability] .Some.SomeList>?> [fake_override] overridden: public open fun parallelStream (): @[EnhancedNullability] java.util.stream.Stream<@[FlexibleNullability] .Some.MyList>?> [fake_override] declared in .MyList - public open fun parallelStream (): @[EnhancedNullability] java.util.stream.Stream<@[FlexibleNullability] E of java.util.ArrayList?> [fake_override] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:kotlin.collections.Collection FUN FAKE_OVERRIDE name:stream visibility:public modality:OPEN <> ($this:kotlin.collections.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[FlexibleNullability] .Some.SomeList>?> [fake_override] overridden: public open fun stream (): @[EnhancedNullability] java.util.stream.Stream<@[FlexibleNullability] .Some.MyList>?> [fake_override] declared in .MyList - public open fun stream (): @[EnhancedNullability] java.util.stream.Stream<@[FlexibleNullability] E of java.util.ArrayList?> [fake_override] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:kotlin.collections.Collection - FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:kotlin.collections.Iterable, p0:@[FlexibleNullability] java.util.function.Consumer.Some.SomeList>?>?) returnType:kotlin.Unit [fake_override] + FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] java.util.function.Consumer.Some.SomeList>?>?) returnType:kotlin.Unit [fake_override] overridden: - public open fun forEach (p0: @[FlexibleNullability] java.util.function.Consumer.Some.MyList>?>?): kotlin.Unit [fake_override] declared in .MyList public open fun forEach (p0: @[FlexibleNullability] java.util.function.Consumer?): kotlin.Unit declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:kotlin.collections.Iterable + $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.function.Consumer.Some.SomeList>?>? - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:java.util.AbstractList, p0:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in .MyList public open fun equals (p0: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + $this: VALUE_PARAMETER name: type:java.util.AbstractList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:java.util.AbstractList) returnType:kotlin.Int [fake_override] overridden: - public open fun hashCode (): kotlin.Int [fake_override] declared in .MyList public open fun hashCode (): kotlin.Int [fake_override] declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + $this: VALUE_PARAMETER name: type:java.util.AbstractList + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:java.util.AbstractCollection) returnType:@[EnhancedNullability] kotlin.String [fake_override] overridden: - public open fun toString (): kotlin.String [fake_override] declared in .MyList public open fun toString (): @[EnhancedNullability] kotlin.String [fake_override] declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:kotlin.Any + $this: VALUE_PARAMETER name: type:java.util.AbstractCollection FUN FAKE_OVERRIDE name:elementData visibility:public/*package*/ modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[FlexibleNullability] .Some.SomeList>? [fake_override] overridden: public/*package*/ open fun elementData (p0: kotlin.Int): @[FlexibleNullability] E of java.util.ArrayList? declared in java.util.ArrayList @@ -404,39 +387,39 @@ 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:kotlin.collections.List, element:.Some) returnType:kotlin.Boolean [fake_override,operator] + FUN FAKE_OVERRIDE name:contains visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] .Some?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun contains (element: .Some.SomeList>): kotlin.Boolean [fake_override,operator] declared in .SomeList - $this: VALUE_PARAMETER name: type:kotlin.collections.List - VALUE_PARAMETER name:element index:0 type:.Some + public open fun contains (p0: @[FlexibleNullability] .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? FUN FAKE_OVERRIDE name:containsAll visibility:public modality:OPEN <> ($this:kotlin.collections.List, elements:kotlin.collections.Collection<.Some>) returnType:kotlin.Boolean [fake_override] overridden: public open fun containsAll (elements: kotlin.collections.Collection<.Some.SomeList>>): kotlin.Boolean [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:kotlin.collections.List VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<.Some> - FUN FAKE_OVERRIDE name:get visibility:public modality:OPEN <> ($this:kotlin.collections.List, index:kotlin.Int) returnType:.Some [fake_override,operator] + FUN FAKE_OVERRIDE name:get visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[FlexibleNullability] .Some? [fake_override,operator] overridden: - public open fun get (index: kotlin.Int): .Some.SomeList> [fake_override,operator] declared in .SomeList - $this: VALUE_PARAMETER name: type:kotlin.collections.List - VALUE_PARAMETER name:index index:0 type:kotlin.Int - FUN FAKE_OVERRIDE name:indexOf visibility:public modality:OPEN <> ($this:kotlin.collections.List, element:.Some) returnType:kotlin.Int [fake_override] + public open fun get (p0: kotlin.Int): @[FlexibleNullability] .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] overridden: - public open fun indexOf (element: .Some.SomeList>): kotlin.Int [fake_override] declared in .SomeList - $this: VALUE_PARAMETER name: type:kotlin.collections.List - VALUE_PARAMETER name:element index:0 type:.Some - FUN FAKE_OVERRIDE name:isEmpty visibility:public modality:OPEN <> ($this:kotlin.collections.List) returnType:kotlin.Boolean [fake_override] + public open fun indexOf (p0: @[FlexibleNullability] .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: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:kotlin.collections.List + $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] overridden: public open fun iterator (): @[EnhancedNullability] kotlin.collections.MutableIterator<@[FlexibleNullability] .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:kotlin.collections.List, element:.Some) returnType:kotlin.Int [fake_override] + FUN FAKE_OVERRIDE name:lastIndexOf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] .Some?) returnType:kotlin.Int [fake_override] overridden: - public open fun lastIndexOf (element: .Some.SomeList>): kotlin.Int [fake_override] declared in .SomeList - $this: VALUE_PARAMETER name: type:kotlin.collections.List - VALUE_PARAMETER name:element index:0 type:.Some + public open fun lastIndexOf (p0: @[FlexibleNullability] .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] overridden: public open fun listIterator (): @[EnhancedNullability] kotlin.collections.MutableListIterator<@[FlexibleNullability] .Some.SomeList>?> [fake_override] declared in .SomeList @@ -453,15 +436,15 @@ FILE fqName: fileName:/MultiList.kt VALUE_PARAMETER name:p0 index:0 type:kotlin.Int VALUE_PARAMETER name:p1 index:1 type:kotlin.Int PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:OPEN <> ($this:kotlin.collections.List) returnType:kotlin.Int [fake_override] + FUN FAKE_OVERRIDE name: visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Int [fake_override] correspondingProperty: PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] overridden: public open fun (): kotlin.Int [fake_override] declared in .SomeList - $this: VALUE_PARAMETER name: type:kotlin.collections.List - FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:kotlin.collections.Collection) returnType:@[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] .Some?> [fake_override] + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] .Some?> [fake_override] overridden: public open fun spliterator (): @[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] .Some.SomeList>?> [fake_override] declared in .SomeList - $this: VALUE_PARAMETER name: type:kotlin.collections.Collection + $this: VALUE_PARAMETER name: type:java.util.ArrayList FUN FAKE_OVERRIDE name:parallelStream visibility:public modality:OPEN <> ($this:kotlin.collections.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[FlexibleNullability] .Some?> [fake_override] overridden: public open fun parallelStream (): @[EnhancedNullability] java.util.stream.Stream<@[FlexibleNullability] .Some.SomeList>?> [fake_override] declared in .SomeList @@ -470,24 +453,24 @@ FILE fqName: fileName:/MultiList.kt overridden: public open fun stream (): @[EnhancedNullability] java.util.stream.Stream<@[FlexibleNullability] .Some.SomeList>?> [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:kotlin.collections.Collection - FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:kotlin.collections.Iterable, p0:@[FlexibleNullability] java.util.function.Consumer.Some?>?) returnType:kotlin.Unit [fake_override] + FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] java.util.function.Consumer.Some?>?) returnType:kotlin.Unit [fake_override] overridden: public open fun forEach (p0: @[FlexibleNullability] java.util.function.Consumer.Some.SomeList>?>?): kotlin.Unit [fake_override] declared in .SomeList - $this: VALUE_PARAMETER name: type:kotlin.collections.Iterable + $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.function.Consumer.Some?>? - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:java.util.AbstractList, p0:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in .SomeList - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + public open fun equals (p0: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in .SomeList + $this: VALUE_PARAMETER name: type:java.util.AbstractList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:java.util.AbstractList) returnType:kotlin.Int [fake_override] overridden: public open fun hashCode (): kotlin.Int [fake_override] declared in .SomeList - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + $this: VALUE_PARAMETER name: type:java.util.AbstractList + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:java.util.AbstractCollection) returnType:@[EnhancedNullability] kotlin.String [fake_override] overridden: - public open fun toString (): kotlin.String [fake_override] declared in .SomeList - $this: VALUE_PARAMETER name: type:kotlin.Any + public open fun toString (): @[EnhancedNullability] kotlin.String [fake_override] declared in .SomeList + $this: VALUE_PARAMETER name: type:java.util.AbstractCollection FUN FAKE_OVERRIDE name:elementData visibility:public/*package*/ modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[FlexibleNullability] .Some? [fake_override] overridden: public/*package*/ open fun elementData (p0: kotlin.Int): @[FlexibleNullability] .Some.SomeList>? [fake_override] declared in .SomeList diff --git a/idea/idea-frontend-fir/testData/memberScopeByFqName/MutableList.kt b/idea/idea-frontend-fir/testData/memberScopeByFqName/MutableList.kt index b37af075727..dc423decb2c 100644 --- a/idea/idea-frontend-fir/testData/memberScopeByFqName/MutableList.kt +++ b/idea/idea-frontend-fir/testData/memberScopeByFqName/MutableList.kt @@ -289,7 +289,7 @@ KtFirFunctionSymbol: isSuspend: false modality: ABSTRACT name: contains - origin: INTERSECTION_OVERRIDE + origin: LIBRARY receiverType: null symbolKind: MEMBER typeParameters: [] @@ -310,7 +310,7 @@ KtFirFunctionSymbol: isSuspend: false modality: ABSTRACT name: containsAll - origin: INTERSECTION_OVERRIDE + origin: LIBRARY receiverType: null symbolKind: MEMBER typeParameters: [] @@ -363,8 +363,8 @@ KtFirFunctionSymbol: annotatedType: [] kotlin/Boolean annotationClassIds: [] annotations: [] - callableIdIfNonLocal: kotlin/collections/MutableList.isEmpty - dispatchType: kotlin/collections/MutableList + callableIdIfNonLocal: kotlin/collections/List.isEmpty + dispatchType: kotlin/collections/List isExtension: false isExternal: false isInline: false @@ -373,7 +373,7 @@ KtFirFunctionSymbol: isSuspend: false modality: ABSTRACT name: isEmpty - origin: INTERSECTION_OVERRIDE + origin: LIBRARY receiverType: null symbolKind: MEMBER typeParameters: [] @@ -427,10 +427,10 @@ KtFirKotlinPropertySymbol: annotationClassIds: [] annotations: [] callableIdIfNonLocal: kotlin/collections/List.size - dispatchType: kotlin/collections/MutableList - getter: null + dispatchType: kotlin/collections/List + getter: KtFirPropertyGetterSymbol() hasBackingField: false - hasGetter: false + hasGetter: true hasSetter: false initializer: null isConst: false @@ -440,7 +440,7 @@ KtFirKotlinPropertySymbol: isVal: true modality: ABSTRACT name: size - origin: INTERSECTION_OVERRIDE + origin: LIBRARY receiverType: null setter: null symbolKind: MEMBER