diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/FakeOverrideGenerator.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/FakeOverrideGenerator.kt index aeafa184aad..69dfb982391 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/FakeOverrideGenerator.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/FakeOverrideGenerator.kt @@ -232,13 +232,14 @@ class FakeOverrideGenerator( private fun IrProperty.discardAccessorsAccordingToBaseVisibility(baseSymbols: List) { for (baseSymbol in baseSymbols) { - val unwrapped = baseSymbol.unwrapFakeOverrides() + val unwrappedSymbol = baseSymbol.unwrapFakeOverrides() + val unwrappedProperty = unwrappedSymbol.fir // Do not create fake overrides for accessors if not allowed to do so, e.g., private lateinit var. - if (unwrapped.fir.getter?.allowsToHaveFakeOverride != true) { + if (!(unwrappedProperty.getter?.allowsToHaveFakeOverride ?: unwrappedProperty.allowsToHaveFakeOverride)) { getter = null } // or private setter - if (unwrapped.fir.setter?.allowsToHaveFakeOverride != true) { + if (!(unwrappedProperty.setter?.allowsToHaveFakeOverride ?: unwrappedProperty.allowsToHaveFakeOverride)) { setter = null } } diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/fir/Fir2IrTextTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/fir/Fir2IrTextTestGenerated.java index 57d3bf7dd27..d90579d9d6e 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/fir/Fir2IrTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/fir/Fir2IrTextTestGenerated.java @@ -1812,6 +1812,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { runTest("compiler/testData/ir/irText/firProblems/InnerClassInAnonymous.kt"); } + @TestMetadata("kt43342.kt") + public void testKt43342() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/kt43342.kt"); + } + @TestMetadata("MultiList.kt") public void testMultiList() throws Exception { runTest("compiler/testData/ir/irText/firProblems/MultiList.kt"); diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/FirDeclarationUtil.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/FirDeclarationUtil.kt index 8b70b7bb7e3..ae0c30205a6 100644 --- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/FirDeclarationUtil.kt +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/FirDeclarationUtil.kt @@ -64,6 +64,9 @@ inline val FirPropertyAccessor.modality get() = status.modality inline val FirPropertyAccessor.visibility get() = status.visibility inline val FirPropertyAccessor.isInline get() = status.isInline inline val FirPropertyAccessor.isExternal get() = status.isExternal + +inline val FirProperty.allowsToHaveFakeOverride: Boolean + get() = !Visibilities.isPrivate(visibility) && visibility != Visibilities.InvisibleFake inline val FirPropertyAccessor.allowsToHaveFakeOverride: Boolean get() = !Visibilities.isPrivate(visibility) && visibility != Visibilities.InvisibleFake diff --git a/compiler/testData/ir/irText/firProblems/kt43342.fir.kt.txt b/compiler/testData/ir/irText/firProblems/kt43342.fir.kt.txt new file mode 100644 index 00000000000..c8ff8f1c5f3 --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/kt43342.fir.kt.txt @@ -0,0 +1,71 @@ +open class ControlFlowInfo : Map { + constructor(map: Map) /* primary */ { + super/*Any*/() + /* () */ + + .#<$$delegate_0> = map + } + + val map: Map + field = map + get + + override fun containsKey(key: K): Boolean { + return .#<$$delegate_0>.containsKey(key = key) + } + + override fun containsValue(value: V): Boolean { + return .#<$$delegate_0>.containsValue(value = value) + } + + override operator fun get(key: K): V? { + return .#<$$delegate_0>.get(key = key) + } + + @SinceKotlin(version = "1.1") + @PlatformDependent + override fun getOrDefault(key: K, defaultValue: V): V { + return .#<$$delegate_0>.getOrDefault(key = key, defaultValue = defaultValue) + } + + override fun isEmpty(): Boolean { + return .#<$$delegate_0>.isEmpty() + } + + override val entries: Set> + override get(): Set> { + return .#<$$delegate_0>.() + } + + override val keys: Set + override get(): Set { + return .#<$$delegate_0>.() + } + + override val size: Int + override get(): Int { + return .#<$$delegate_0>.() + } + + override val values: Collection + override get(): Collection { + return .#<$$delegate_0>.() + } + + local /* final field */ val <$$delegate_0>: Map + +} + +class StringFlowInfo : ControlFlowInfo { + constructor(map: Map) /* primary */ { + super/*ControlFlowInfo*/(map = map) + /* () */ + + } + + fun foo(info: StringFlowInfo) { + .() /*~> Unit */ + info.() /*~> Unit */ + } + +} diff --git a/compiler/testData/ir/irText/firProblems/kt43342.fir.txt b/compiler/testData/ir/irText/firProblems/kt43342.fir.txt new file mode 100644 index 00000000000..cdd198c1fb4 --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/kt43342.fir.txt @@ -0,0 +1,228 @@ +FILE fqName: fileName:/kt43342.kt + CLASS CLASS name:ControlFlowInfo modality:OPEN visibility:public superTypes:[kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo>] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + TYPE_PARAMETER name:K index:0 variance: superTypes:[kotlin.Any?] + TYPE_PARAMETER name:V index:1 variance: superTypes:[kotlin.Any?] + CONSTRUCTOR visibility:public <> (map:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo>) returnType:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> [primary] + VALUE_PARAMETER name:map index:0 type:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:ControlFlowInfo modality:OPEN visibility:public superTypes:[kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo>]' + SET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> visibility:local [final]' type=kotlin.Unit origin=EQ + receiver: GET_VAR ': .ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo' type=.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> origin=null + value: GET_VAR 'map: kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo.' type=kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> origin=null + PROPERTY name:map visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:map type:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> visibility:private [final] + EXPRESSION_BODY + GET_VAR 'map: kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo.' type=kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>) returnType:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> + correspondingProperty: PROPERTY name:map visibility:public modality:FINAL [val] + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:map type:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> visibility:private [final]' type=kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> origin=null + receiver: GET_VAR ': .ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo.' type=.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> origin=null + FUN DELEGATED_MEMBER name:containsKey visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>, key:K of .ControlFlowInfo) returnType:kotlin.Boolean + overridden: + public abstract fun containsKey (key: K of kotlin.collections.Map): kotlin.Boolean declared in kotlin.collections.Map + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + VALUE_PARAMETER name:key index:0 type:K of .ControlFlowInfo + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun containsKey (key: K of .ControlFlowInfo): kotlin.Boolean declared in .ControlFlowInfo' + CALL 'public abstract fun containsKey (key: K of kotlin.collections.Map): kotlin.Boolean declared in kotlin.collections.Map' type=kotlin.Boolean origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> visibility:local [final]' type=kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> origin=null + receiver: GET_VAR ': .ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo.containsKey' type=.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> origin=null + key: GET_VAR 'key: K of .ControlFlowInfo declared in .ControlFlowInfo.containsKey' type=K of .ControlFlowInfo origin=null + FUN DELEGATED_MEMBER name:containsValue visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>, value:V of .ControlFlowInfo) returnType:kotlin.Boolean + overridden: + public abstract fun containsValue (value: V of kotlin.collections.Map): kotlin.Boolean declared in kotlin.collections.Map + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + VALUE_PARAMETER name:value index:0 type:V of .ControlFlowInfo + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun containsValue (value: V of .ControlFlowInfo): kotlin.Boolean declared in .ControlFlowInfo' + CALL 'public abstract fun containsValue (value: V of kotlin.collections.Map): kotlin.Boolean declared in kotlin.collections.Map' type=kotlin.Boolean origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> visibility:local [final]' type=kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> origin=null + receiver: GET_VAR ': .ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo.containsValue' type=.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> origin=null + value: GET_VAR 'value: V of .ControlFlowInfo declared in .ControlFlowInfo.containsValue' type=V of .ControlFlowInfo origin=null + FUN DELEGATED_MEMBER name:get visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>, key:K of .ControlFlowInfo) returnType:V of .ControlFlowInfo? [operator] + overridden: + public abstract fun get (key: K of kotlin.collections.Map): V of kotlin.collections.Map? [operator] declared in kotlin.collections.Map + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + VALUE_PARAMETER name:key index:0 type:K of .ControlFlowInfo + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun get (key: K of .ControlFlowInfo): V of .ControlFlowInfo? [operator] declared in .ControlFlowInfo' + CALL 'public abstract fun get (key: K of kotlin.collections.Map): V of kotlin.collections.Map? [operator] declared in kotlin.collections.Map' type=V of .ControlFlowInfo? origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> visibility:local [final]' type=kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> origin=null + receiver: GET_VAR ': .ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo.get' type=.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> origin=null + key: GET_VAR 'key: K of .ControlFlowInfo declared in .ControlFlowInfo.get' type=K of .ControlFlowInfo origin=null + FUN DELEGATED_MEMBER name:getOrDefault visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>, key:K of .ControlFlowInfo, defaultValue:V of .ControlFlowInfo) returnType:V of .ControlFlowInfo + annotations: + SinceKotlin(version = '1.1') + PlatformDependent + overridden: + public open fun getOrDefault (key: K of kotlin.collections.Map, defaultValue: V of kotlin.collections.Map): V of kotlin.collections.Map declared in kotlin.collections.Map + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + VALUE_PARAMETER name:key index:0 type:K of .ControlFlowInfo + VALUE_PARAMETER name:defaultValue index:1 type:V of .ControlFlowInfo + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun getOrDefault (key: K of .ControlFlowInfo, defaultValue: V of .ControlFlowInfo): V of .ControlFlowInfo declared in .ControlFlowInfo' + CALL 'public open fun getOrDefault (key: K of kotlin.collections.Map, defaultValue: V of kotlin.collections.Map): V of kotlin.collections.Map declared in kotlin.collections.Map' type=V of .ControlFlowInfo origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> visibility:local [final]' type=kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> origin=null + receiver: GET_VAR ': .ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo.getOrDefault' type=.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> origin=null + key: GET_VAR 'key: K of .ControlFlowInfo declared in .ControlFlowInfo.getOrDefault' type=K of .ControlFlowInfo origin=null + defaultValue: GET_VAR 'defaultValue: V of .ControlFlowInfo declared in .ControlFlowInfo.getOrDefault' type=V of .ControlFlowInfo origin=null + FUN DELEGATED_MEMBER name:isEmpty visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>) returnType:kotlin.Boolean + overridden: + public abstract fun isEmpty (): kotlin.Boolean declared in kotlin.collections.Map + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun isEmpty (): kotlin.Boolean declared in .ControlFlowInfo' + CALL 'public abstract fun isEmpty (): kotlin.Boolean declared in kotlin.collections.Map' type=kotlin.Boolean origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> visibility:local [final]' type=kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> origin=null + receiver: GET_VAR ': .ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo.isEmpty' type=.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> origin=null + PROPERTY DELEGATED_MEMBER name:entries visibility:public modality:OPEN [val] + FUN DELEGATED_MEMBER name: visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>) returnType:kotlin.collections.Set.ControlFlowInfo, V of .ControlFlowInfo>> + correspondingProperty: PROPERTY DELEGATED_MEMBER name:entries visibility:public modality:OPEN [val] + overridden: + public abstract fun (): kotlin.collections.Set> declared in kotlin.collections.Map + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun (): kotlin.collections.Set.ControlFlowInfo, V of .ControlFlowInfo>> declared in .ControlFlowInfo' + CALL 'public abstract fun (): kotlin.collections.Set> declared in kotlin.collections.Map' type=kotlin.collections.Set.ControlFlowInfo, V of .ControlFlowInfo>> origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> visibility:local [final]' type=kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> origin=null + receiver: GET_VAR ': .ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo.' type=.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> origin=null + PROPERTY DELEGATED_MEMBER name:keys visibility:public modality:OPEN [val] + FUN DELEGATED_MEMBER name: visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>) returnType:kotlin.collections.Set.ControlFlowInfo> + correspondingProperty: PROPERTY DELEGATED_MEMBER name:keys visibility:public modality:OPEN [val] + overridden: + public abstract fun (): kotlin.collections.Set declared in kotlin.collections.Map + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun (): kotlin.collections.Set.ControlFlowInfo> declared in .ControlFlowInfo' + CALL 'public abstract fun (): kotlin.collections.Set declared in kotlin.collections.Map' type=kotlin.collections.Set.ControlFlowInfo> origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> visibility:local [final]' type=kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> origin=null + receiver: GET_VAR ': .ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo.' type=.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> origin=null + PROPERTY DELEGATED_MEMBER name:size visibility:public modality:OPEN [val] + FUN DELEGATED_MEMBER name: visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>) returnType:kotlin.Int + correspondingProperty: PROPERTY DELEGATED_MEMBER name:size visibility:public modality:OPEN [val] + overridden: + public abstract fun (): kotlin.Int declared in kotlin.collections.Map + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun (): kotlin.Int declared in .ControlFlowInfo' + CALL 'public abstract fun (): kotlin.Int declared in kotlin.collections.Map' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> visibility:local [final]' type=kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> origin=null + receiver: GET_VAR ': .ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo.' type=.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> origin=null + PROPERTY DELEGATED_MEMBER name:values visibility:public modality:OPEN [val] + FUN DELEGATED_MEMBER name: visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>) returnType:kotlin.collections.Collection.ControlFlowInfo> + correspondingProperty: PROPERTY DELEGATED_MEMBER name:values visibility:public modality:OPEN [val] + overridden: + public abstract fun (): kotlin.collections.Collection declared in kotlin.collections.Map + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun (): kotlin.collections.Collection.ControlFlowInfo> declared in .ControlFlowInfo' + CALL 'public abstract fun (): kotlin.collections.Collection declared in kotlin.collections.Map' type=kotlin.collections.Collection.ControlFlowInfo> origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> visibility:local [final]' type=kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> origin=null + receiver: GET_VAR ': .ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo.' type=.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> origin=null + FIELD DELEGATE name:<$$delegate_0> type:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> visibility:local [final] + 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 + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + CLASS CLASS name:StringFlowInfo modality:FINAL visibility:public superTypes:[.ControlFlowInfo] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.StringFlowInfo + CONSTRUCTOR visibility:public <> (map:kotlin.collections.Map) returnType:.StringFlowInfo [primary] + VALUE_PARAMETER name:map index:0 type:kotlin.collections.Map + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor (map: kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo>) [primary] declared in .ControlFlowInfo' + : kotlin.String + : kotlin.String + map: GET_VAR 'map: kotlin.collections.Map declared in .StringFlowInfo.' type=kotlin.collections.Map origin=null + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:StringFlowInfo modality:FINAL visibility:public superTypes:[.ControlFlowInfo]' + FUN name:foo visibility:public modality:FINAL <> ($this:.StringFlowInfo, info:.StringFlowInfo) returnType:kotlin.Unit + $this: VALUE_PARAMETER name: type:.StringFlowInfo + VALUE_PARAMETER name:info index:0 type:.StringFlowInfo + BLOCK_BODY + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + CALL 'public open fun (): kotlin.collections.Set [fake_override] declared in .StringFlowInfo' type=kotlin.collections.Set origin=GET_PROPERTY + $this: GET_VAR ': .StringFlowInfo declared in .StringFlowInfo.foo' type=.StringFlowInfo origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + CALL 'public open fun (): kotlin.collections.Set [fake_override] declared in .StringFlowInfo' type=kotlin.collections.Set origin=GET_PROPERTY + $this: GET_VAR 'info: .StringFlowInfo declared in .StringFlowInfo.foo' type=.StringFlowInfo origin=null + PROPERTY FAKE_OVERRIDE name:map visibility:public modality:FINAL [fake_override,val] + FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>) returnType:kotlin.collections.Map [fake_override] + correspondingProperty: PROPERTY FAKE_OVERRIDE name:map visibility:public modality:FINAL [fake_override,val] + overridden: + public final fun (): kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + FUN FAKE_OVERRIDE name:containsKey visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>, key:kotlin.String) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun containsKey (key: K of .ControlFlowInfo): kotlin.Boolean declared in .ControlFlowInfo + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + VALUE_PARAMETER name:key index:0 type:kotlin.String + FUN FAKE_OVERRIDE name:containsValue visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>, value:kotlin.String) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun containsValue (value: V of .ControlFlowInfo): kotlin.Boolean declared in .ControlFlowInfo + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + VALUE_PARAMETER name:value index:0 type:kotlin.String + FUN FAKE_OVERRIDE name:get visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>, key:kotlin.String) returnType:kotlin.String? [fake_override,operator] + overridden: + public open fun get (key: K of .ControlFlowInfo): V of .ControlFlowInfo? [operator] declared in .ControlFlowInfo + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + VALUE_PARAMETER name:key index:0 type:kotlin.String + FUN FAKE_OVERRIDE name:getOrDefault visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>, key:kotlin.String, defaultValue:kotlin.String) returnType:kotlin.String [fake_override] + overridden: + public open fun getOrDefault (key: K of .ControlFlowInfo, defaultValue: V of .ControlFlowInfo): V of .ControlFlowInfo declared in .ControlFlowInfo + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + VALUE_PARAMETER name:key index:0 type:kotlin.String + VALUE_PARAMETER name:defaultValue index:1 type:kotlin.String + FUN FAKE_OVERRIDE name:isEmpty visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun isEmpty (): kotlin.Boolean declared in .ControlFlowInfo + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + PROPERTY FAKE_OVERRIDE name:entries visibility:public modality:OPEN [fake_override,val] + FUN FAKE_OVERRIDE name: visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>) returnType:kotlin.collections.Set> [fake_override] + correspondingProperty: PROPERTY FAKE_OVERRIDE name:entries visibility:public modality:OPEN [fake_override,val] + overridden: + public open fun (): kotlin.collections.Set.ControlFlowInfo, V of .ControlFlowInfo>> declared in .ControlFlowInfo + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + PROPERTY FAKE_OVERRIDE name:keys visibility:public modality:OPEN [fake_override,val] + FUN FAKE_OVERRIDE name: visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>) returnType:kotlin.collections.Set [fake_override] + correspondingProperty: PROPERTY FAKE_OVERRIDE name:keys visibility:public modality:OPEN [fake_override,val] + overridden: + public open fun (): kotlin.collections.Set.ControlFlowInfo> declared in .ControlFlowInfo + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] + FUN FAKE_OVERRIDE name: visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>) returnType:kotlin.Int [fake_override] + correspondingProperty: PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] + overridden: + public open fun (): kotlin.Int declared in .ControlFlowInfo + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + PROPERTY FAKE_OVERRIDE name:values visibility:public modality:OPEN [fake_override,val] + FUN FAKE_OVERRIDE name: visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>) returnType:kotlin.collections.Collection [fake_override] + correspondingProperty: PROPERTY FAKE_OVERRIDE name:values visibility:public modality:OPEN [fake_override,val] + overridden: + public open fun (): kotlin.collections.Collection.ControlFlowInfo> declared in .ControlFlowInfo + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + 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 + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/firProblems/kt43342.kt b/compiler/testData/ir/irText/firProblems/kt43342.kt new file mode 100644 index 00000000000..03c4d2ed2b5 --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/kt43342.kt @@ -0,0 +1,10 @@ +// WITH_RUNTIME + +open class ControlFlowInfo(val map: Map): Map by map + +class StringFlowInfo(map: Map): ControlFlowInfo(map) { + fun foo(info: StringFlowInfo) { + keys + info.keys + } +} \ No newline at end of file diff --git a/compiler/testData/ir/irText/firProblems/kt43342.kt.txt b/compiler/testData/ir/irText/firProblems/kt43342.kt.txt new file mode 100644 index 00000000000..65a62c7531c --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/kt43342.kt.txt @@ -0,0 +1,62 @@ +open class ControlFlowInfo : Map { + constructor(map: Map) /* primary */ { + super/*Any*/() + /* () */ + + } + + val map: Map + field = map + get + + override fun containsKey(key: K): Boolean { + return .#map.containsKey(key = key) + } + + override fun containsValue(value: V): Boolean { + return .#map.containsValue(value = value) + } + + override operator fun get(key: K): V? { + return .#map.get(key = key) + } + + override fun isEmpty(): Boolean { + return .#map.isEmpty() + } + + override val entries: Set> + override get(): Set> { + return .#map.() + } + + override val keys: Set + override get(): Set { + return .#map.() + } + + override val size: Int + override get(): Int { + return .#map.() + } + + override val values: Collection + override get(): Collection { + return .#map.() + } + +} + +class StringFlowInfo : ControlFlowInfo { + constructor(map: Map) /* primary */ { + super/*ControlFlowInfo*/(map = map) + /* () */ + + } + + fun foo(info: StringFlowInfo) { + .() /*~> Unit */ + info.() /*~> Unit */ + } + +} diff --git a/compiler/testData/ir/irText/firProblems/kt43342.txt b/compiler/testData/ir/irText/firProblems/kt43342.txt new file mode 100644 index 00000000000..81d5b3009fc --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/kt43342.txt @@ -0,0 +1,202 @@ +FILE fqName: fileName:/kt43342.kt + CLASS CLASS name:ControlFlowInfo modality:OPEN visibility:public superTypes:[kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo>] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + TYPE_PARAMETER name:K index:0 variance: superTypes:[kotlin.Any?] + TYPE_PARAMETER name:V index:1 variance: superTypes:[kotlin.Any?] + CONSTRUCTOR visibility:public <> (map:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo>) returnType:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> [primary] + VALUE_PARAMETER name:map index:0 type:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:ControlFlowInfo modality:OPEN visibility:public superTypes:[kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo>]' + PROPERTY name:map visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:map type:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> visibility:private [final] + EXPRESSION_BODY + GET_VAR 'map: kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo.' type=kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>) returnType:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> + correspondingProperty: PROPERTY name:map visibility:public modality:FINAL [val] + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:map type:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> visibility:private [final]' type=kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> origin=null + receiver: GET_VAR ': .ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo.' type=.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> origin=null + FUN DELEGATED_MEMBER name:containsKey visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>, key:K of .ControlFlowInfo) returnType:kotlin.Boolean + overridden: + public abstract fun containsKey (key: K of kotlin.collections.Map): kotlin.Boolean declared in kotlin.collections.Map + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + VALUE_PARAMETER name:key index:0 type:K of .ControlFlowInfo + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun containsKey (key: K of .ControlFlowInfo): kotlin.Boolean declared in .ControlFlowInfo' + CALL 'public abstract fun containsKey (key: K of kotlin.collections.Map): kotlin.Boolean declared in kotlin.collections.Map' type=kotlin.Boolean origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:map type:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> visibility:private [final]' type=kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> origin=null + receiver: GET_VAR ': .ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo.containsKey' type=.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> origin=null + key: GET_VAR 'key: K of .ControlFlowInfo declared in .ControlFlowInfo.containsKey' type=K of .ControlFlowInfo origin=null + FUN DELEGATED_MEMBER name:containsValue visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>, value:V of .ControlFlowInfo) returnType:kotlin.Boolean + overridden: + public abstract fun containsValue (value: V of kotlin.collections.Map): kotlin.Boolean declared in kotlin.collections.Map + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + VALUE_PARAMETER name:value index:0 type:V of .ControlFlowInfo + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun containsValue (value: V of .ControlFlowInfo): kotlin.Boolean declared in .ControlFlowInfo' + CALL 'public abstract fun containsValue (value: V of kotlin.collections.Map): kotlin.Boolean declared in kotlin.collections.Map' type=kotlin.Boolean origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:map type:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> visibility:private [final]' type=kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> origin=null + receiver: GET_VAR ': .ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo.containsValue' type=.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> origin=null + value: GET_VAR 'value: V of .ControlFlowInfo declared in .ControlFlowInfo.containsValue' type=V of .ControlFlowInfo origin=null + FUN DELEGATED_MEMBER name:get visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>, key:K of .ControlFlowInfo) returnType:V of .ControlFlowInfo? [operator] + overridden: + public abstract fun get (key: K of kotlin.collections.Map): V of kotlin.collections.Map? [operator] declared in kotlin.collections.Map + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + VALUE_PARAMETER name:key index:0 type:K of .ControlFlowInfo + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun get (key: K of .ControlFlowInfo): V of .ControlFlowInfo? [operator] declared in .ControlFlowInfo' + CALL 'public abstract fun get (key: K of kotlin.collections.Map): V of kotlin.collections.Map? [operator] declared in kotlin.collections.Map' type=V of .ControlFlowInfo? origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:map type:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> visibility:private [final]' type=kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> origin=null + receiver: GET_VAR ': .ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo.get' type=.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> origin=null + key: GET_VAR 'key: K of .ControlFlowInfo declared in .ControlFlowInfo.get' type=K of .ControlFlowInfo origin=null + FUN DELEGATED_MEMBER name:isEmpty visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>) returnType:kotlin.Boolean + overridden: + public abstract fun isEmpty (): kotlin.Boolean declared in kotlin.collections.Map + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun isEmpty (): kotlin.Boolean declared in .ControlFlowInfo' + CALL 'public abstract fun isEmpty (): kotlin.Boolean declared in kotlin.collections.Map' type=kotlin.Boolean origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:map type:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> visibility:private [final]' type=kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> origin=null + receiver: GET_VAR ': .ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo.isEmpty' type=.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> origin=null + PROPERTY DELEGATED_MEMBER name:entries visibility:public modality:OPEN [val] + FUN DELEGATED_MEMBER name: visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>) returnType:kotlin.collections.Set.ControlFlowInfo, V of .ControlFlowInfo>> + correspondingProperty: PROPERTY DELEGATED_MEMBER name:entries visibility:public modality:OPEN [val] + overridden: + public abstract fun (): kotlin.collections.Set> declared in kotlin.collections.Map + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun (): kotlin.collections.Set.ControlFlowInfo, V of .ControlFlowInfo>> declared in .ControlFlowInfo' + CALL 'public abstract fun (): kotlin.collections.Set> declared in kotlin.collections.Map' type=kotlin.collections.Set.ControlFlowInfo, V of .ControlFlowInfo>> origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:map type:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> visibility:private [final]' type=kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> origin=null + receiver: GET_VAR ': .ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo.' type=.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> origin=null + PROPERTY DELEGATED_MEMBER name:keys visibility:public modality:OPEN [val] + FUN DELEGATED_MEMBER name: visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>) returnType:kotlin.collections.Set.ControlFlowInfo> + correspondingProperty: PROPERTY DELEGATED_MEMBER name:keys visibility:public modality:OPEN [val] + overridden: + public abstract fun (): kotlin.collections.Set declared in kotlin.collections.Map + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun (): kotlin.collections.Set.ControlFlowInfo> declared in .ControlFlowInfo' + CALL 'public abstract fun (): kotlin.collections.Set declared in kotlin.collections.Map' type=kotlin.collections.Set.ControlFlowInfo> origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:map type:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> visibility:private [final]' type=kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> origin=null + receiver: GET_VAR ': .ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo.' type=.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> origin=null + PROPERTY DELEGATED_MEMBER name:size visibility:public modality:OPEN [val] + FUN DELEGATED_MEMBER name: visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>) returnType:kotlin.Int + correspondingProperty: PROPERTY DELEGATED_MEMBER name:size visibility:public modality:OPEN [val] + overridden: + public abstract fun (): kotlin.Int declared in kotlin.collections.Map + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun (): kotlin.Int declared in .ControlFlowInfo' + CALL 'public abstract fun (): kotlin.Int declared in kotlin.collections.Map' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:map type:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> visibility:private [final]' type=kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> origin=null + receiver: GET_VAR ': .ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo.' type=.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> origin=null + PROPERTY DELEGATED_MEMBER name:values visibility:public modality:OPEN [val] + FUN DELEGATED_MEMBER name: visibility:public modality:OPEN <> ($this:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo>) returnType:kotlin.collections.Collection.ControlFlowInfo> + correspondingProperty: PROPERTY DELEGATED_MEMBER name:values visibility:public modality:OPEN [val] + overridden: + public abstract fun (): kotlin.collections.Collection declared in kotlin.collections.Map + $this: VALUE_PARAMETER name: type:.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun (): kotlin.collections.Collection.ControlFlowInfo> declared in .ControlFlowInfo' + CALL 'public abstract fun (): kotlin.collections.Collection declared in kotlin.collections.Map' type=kotlin.collections.Collection.ControlFlowInfo> origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:map type:kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> visibility:private [final]' type=kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> origin=null + receiver: GET_VAR ': .ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo.' type=.ControlFlowInfo.ControlFlowInfo, V of .ControlFlowInfo> 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 [fake_override,operator] declared in kotlin.collections.Map + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.collections.Map + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String [fake_override] declared in kotlin.collections.Map + $this: VALUE_PARAMETER name: type:kotlin.Any + CLASS CLASS name:StringFlowInfo modality:FINAL visibility:public superTypes:[.ControlFlowInfo] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.StringFlowInfo + CONSTRUCTOR visibility:public <> (map:kotlin.collections.Map) returnType:.StringFlowInfo [primary] + VALUE_PARAMETER name:map index:0 type:kotlin.collections.Map + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor (map: kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo>) [primary] declared in .ControlFlowInfo' + : kotlin.String + : kotlin.String + map: GET_VAR 'map: kotlin.collections.Map declared in .StringFlowInfo.' type=kotlin.collections.Map origin=null + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:StringFlowInfo modality:FINAL visibility:public superTypes:[.ControlFlowInfo]' + FUN name:foo visibility:public modality:FINAL <> ($this:.StringFlowInfo, info:.StringFlowInfo) returnType:kotlin.Unit + $this: VALUE_PARAMETER name: type:.StringFlowInfo + VALUE_PARAMETER name:info index:0 type:.StringFlowInfo + BLOCK_BODY + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + CALL 'public open fun (): kotlin.collections.Set [fake_override] declared in .StringFlowInfo' type=kotlin.collections.Set origin=GET_PROPERTY + $this: GET_VAR ': .StringFlowInfo declared in .StringFlowInfo.foo' type=.StringFlowInfo origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + CALL 'public open fun (): kotlin.collections.Set [fake_override] declared in .StringFlowInfo' type=kotlin.collections.Set origin=GET_PROPERTY + $this: GET_VAR 'info: .StringFlowInfo declared in .StringFlowInfo.foo' type=.StringFlowInfo origin=null + PROPERTY FAKE_OVERRIDE name:map visibility:public modality:FINAL [fake_override,val] + FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.ControlFlowInfo) returnType:kotlin.collections.Map [fake_override] + correspondingProperty: PROPERTY FAKE_OVERRIDE name:map visibility:public modality:FINAL [fake_override,val] + overridden: + public final fun (): kotlin.collections.Map.ControlFlowInfo, V of .ControlFlowInfo> declared in .ControlFlowInfo + $this: VALUE_PARAMETER name: type:.ControlFlowInfo + FUN FAKE_OVERRIDE name:containsKey visibility:public modality:OPEN <> ($this:.ControlFlowInfo, key:kotlin.String) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun containsKey (key: K of .ControlFlowInfo): kotlin.Boolean declared in .ControlFlowInfo + $this: VALUE_PARAMETER name: type:.ControlFlowInfo + VALUE_PARAMETER name:key index:0 type:kotlin.String + FUN FAKE_OVERRIDE name:containsValue visibility:public modality:OPEN <> ($this:.ControlFlowInfo, value:kotlin.String) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun containsValue (value: V of .ControlFlowInfo): kotlin.Boolean declared in .ControlFlowInfo + $this: VALUE_PARAMETER name: type:.ControlFlowInfo + VALUE_PARAMETER name:value index:0 type:kotlin.String + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in .ControlFlowInfo + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:get visibility:public modality:OPEN <> ($this:.ControlFlowInfo, key:kotlin.String) returnType:kotlin.String? [fake_override,operator] + overridden: + public open fun get (key: K of .ControlFlowInfo): V of .ControlFlowInfo? [operator] declared in .ControlFlowInfo + $this: VALUE_PARAMETER name: type:.ControlFlowInfo + VALUE_PARAMETER name:key index:0 type:kotlin.String + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int [fake_override] declared in .ControlFlowInfo + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:isEmpty visibility:public modality:OPEN <> ($this:.ControlFlowInfo) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun isEmpty (): kotlin.Boolean declared in .ControlFlowInfo + $this: VALUE_PARAMETER name: type:.ControlFlowInfo + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String [fake_override] declared in .ControlFlowInfo + $this: VALUE_PARAMETER name: type:kotlin.Any + PROPERTY FAKE_OVERRIDE name:entries visibility:public modality:OPEN [fake_override,val] + FUN FAKE_OVERRIDE name: visibility:public modality:OPEN <> ($this:.ControlFlowInfo) returnType:kotlin.collections.Set> [fake_override] + correspondingProperty: PROPERTY FAKE_OVERRIDE name:entries visibility:public modality:OPEN [fake_override,val] + overridden: + public open fun (): kotlin.collections.Set.ControlFlowInfo, V of .ControlFlowInfo>> declared in .ControlFlowInfo + $this: VALUE_PARAMETER name: type:.ControlFlowInfo + PROPERTY FAKE_OVERRIDE name:keys visibility:public modality:OPEN [fake_override,val] + FUN FAKE_OVERRIDE name: visibility:public modality:OPEN <> ($this:.ControlFlowInfo) returnType:kotlin.collections.Set [fake_override] + correspondingProperty: PROPERTY FAKE_OVERRIDE name:keys visibility:public modality:OPEN [fake_override,val] + overridden: + public open fun (): kotlin.collections.Set.ControlFlowInfo> declared in .ControlFlowInfo + $this: VALUE_PARAMETER name: type:.ControlFlowInfo + PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] + FUN FAKE_OVERRIDE name: visibility:public modality:OPEN <> ($this:.ControlFlowInfo) returnType:kotlin.Int [fake_override] + correspondingProperty: PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] + overridden: + public open fun (): kotlin.Int declared in .ControlFlowInfo + $this: VALUE_PARAMETER name: type:.ControlFlowInfo + PROPERTY FAKE_OVERRIDE name:values visibility:public modality:OPEN [fake_override,val] + FUN FAKE_OVERRIDE name: visibility:public modality:OPEN <> ($this:.ControlFlowInfo) returnType:kotlin.collections.Collection [fake_override] + correspondingProperty: PROPERTY FAKE_OVERRIDE name:values visibility:public modality:OPEN [fake_override,val] + overridden: + public open fun (): kotlin.collections.Collection.ControlFlowInfo> declared in .ControlFlowInfo + $this: VALUE_PARAMETER name: type:.ControlFlowInfo diff --git a/compiler/tests-gen/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java index 637604c5043..9e5ac0cf31b 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java @@ -1811,6 +1811,11 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { runTest("compiler/testData/ir/irText/firProblems/InnerClassInAnonymous.kt"); } + @TestMetadata("kt43342.kt") + public void testKt43342() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/kt43342.kt"); + } + @TestMetadata("MultiList.kt") public void testMultiList() throws Exception { runTest("compiler/testData/ir/irText/firProblems/MultiList.kt");