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 7f13a2d4ae3..a6d9d2f26b7 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/FirBuilder.kt"); } + @TestMetadata("ImplicitReceiverStack.kt") + public void testImplicitReceiverStack() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt"); + } + @TestMetadata("inapplicableCollectionSet.kt") public void testInapplicableCollectionSet() throws Exception { runTest("compiler/testData/ir/irText/firProblems/inapplicableCollectionSet.kt"); diff --git a/compiler/fir/jvm/src/org/jetbrains/kotlin/fir/scopes/jvm/JvmMappedScope.kt b/compiler/fir/jvm/src/org/jetbrains/kotlin/fir/scopes/jvm/JvmMappedScope.kt index 141be33094d..fa4a240654d 100644 --- a/compiler/fir/jvm/src/org/jetbrains/kotlin/fir/scopes/jvm/JvmMappedScope.kt +++ b/compiler/fir/jvm/src/org/jetbrains/kotlin/fir/scopes/jvm/JvmMappedScope.kt @@ -76,7 +76,7 @@ class JvmMappedScope( } override fun getCallableNames(): Set { - return declaredMemberScope.getContainingCallableNamesIfPresent() + return declaredMemberScope.getContainingCallableNamesIfPresent() + signatures.visibleMethodSignaturesByName.keys } override fun getClassifierNames(): Set { diff --git a/compiler/testData/ir/irText/firProblems/AbstractMutableMap.fir.txt b/compiler/testData/ir/irText/firProblems/AbstractMutableMap.fir.txt index 88468b10bc9..53ef0b5e355 100644 --- a/compiler/testData/ir/irText/firProblems/AbstractMutableMap.fir.txt +++ b/compiler/testData/ir/irText/firProblems/AbstractMutableMap.fir.txt @@ -65,6 +65,55 @@ FILE fqName: fileName:/AbstractMutableMap.kt overridden: public abstract fun (): kotlin.collections.MutableCollection declared in kotlin.collections.MutableMap $this: VALUE_PARAMETER name: type:kotlin.collections.MutableMap + FUN FAKE_OVERRIDE name:replaceAll visibility:public modality:OPEN <> ($this:java.util.Map, p0:@[FlexibleNullability] java.util.function.BiFunction.MyMap?, in V of .MyMap?, out V of .MyMap?>) returnType:kotlin.Unit [fake_override] + overridden: + public open fun replaceAll (p0: @[FlexibleNullability] java.util.function.BiFunction): kotlin.Unit declared in java.util.Map + $this: VALUE_PARAMETER name: type:java.util.Map + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.function.BiFunction.MyMap?, in V of .MyMap?, out V of .MyMap?> + FUN FAKE_OVERRIDE name:merge visibility:public modality:OPEN <> ($this:java.util.Map, p0:K of .MyMap, p1:V of .MyMap, p2:@[FlexibleNullability] java.util.function.BiFunction.MyMap?, in V of .MyMap?, out V of .MyMap?>) returnType:V of .MyMap? [fake_override] + overridden: + public open fun merge (p0: @[FlexibleNullability] K of java.util.Map, p1: @[FlexibleNullability] V of java.util.Map, p2: @[FlexibleNullability] java.util.function.BiFunction): @[FlexibleNullability] V of java.util.Map? declared in java.util.Map + $this: VALUE_PARAMETER name: type:java.util.Map + VALUE_PARAMETER name:p0 index:0 type:K of .MyMap + VALUE_PARAMETER name:p1 index:1 type:V of .MyMap + VALUE_PARAMETER name:p2 index:2 type:@[FlexibleNullability] java.util.function.BiFunction.MyMap?, in V of .MyMap?, out V of .MyMap?> + FUN FAKE_OVERRIDE name:computeIfPresent visibility:public modality:OPEN <> ($this:java.util.Map, p0:K of .MyMap, p1:@[FlexibleNullability] java.util.function.BiFunction.MyMap?, in V of .MyMap?, out V of .MyMap?>) returnType:V of .MyMap? [fake_override] + overridden: + public open fun computeIfPresent (p0: @[FlexibleNullability] K of java.util.Map, p1: @[FlexibleNullability] java.util.function.BiFunction): @[FlexibleNullability] V of java.util.Map? declared in java.util.Map + $this: VALUE_PARAMETER name: type:java.util.Map + VALUE_PARAMETER name:p0 index:0 type:K of .MyMap + VALUE_PARAMETER name:p1 index:1 type:@[FlexibleNullability] java.util.function.BiFunction.MyMap?, in V of .MyMap?, out V of .MyMap?> + FUN FAKE_OVERRIDE name:putIfAbsent visibility:public modality:OPEN <> ($this:java.util.Map, p0:K of .MyMap, p1:V of .MyMap) returnType:V of .MyMap? [fake_override] + overridden: + public open fun putIfAbsent (p0: @[FlexibleNullability] K of java.util.Map, p1: @[FlexibleNullability] V of java.util.Map): @[FlexibleNullability] V of java.util.Map? declared in java.util.Map + $this: VALUE_PARAMETER name: type:java.util.Map + VALUE_PARAMETER name:p0 index:0 type:K of .MyMap + VALUE_PARAMETER name:p1 index:1 type:V of .MyMap + FUN FAKE_OVERRIDE name:replace visibility:public modality:OPEN <> ($this:java.util.Map, p0:K of .MyMap?, p1:V of .MyMap?, p2:V of .MyMap?) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun replace (p0: K of java.util.Map?, p1: V of java.util.Map?, p2: V of java.util.Map?): kotlin.Boolean declared in java.util.Map + $this: VALUE_PARAMETER name: type:java.util.Map + VALUE_PARAMETER name:p0 index:0 type:K of .MyMap? + VALUE_PARAMETER name:p1 index:1 type:V of .MyMap? + VALUE_PARAMETER name:p2 index:2 type:V of .MyMap? + FUN FAKE_OVERRIDE name:replace visibility:public modality:OPEN <> ($this:java.util.Map, p0:K of .MyMap, p1:V of .MyMap) returnType:V of .MyMap? [fake_override] + overridden: + public open fun replace (p0: @[FlexibleNullability] K of java.util.Map, p1: @[FlexibleNullability] V of java.util.Map): @[FlexibleNullability] V of java.util.Map? declared in java.util.Map + $this: VALUE_PARAMETER name: type:java.util.Map + VALUE_PARAMETER name:p0 index:0 type:K of .MyMap + VALUE_PARAMETER name:p1 index:1 type:V of .MyMap + FUN FAKE_OVERRIDE name:computeIfAbsent visibility:public modality:OPEN <> ($this:java.util.Map, p0:K of .MyMap, p1:@[FlexibleNullability] java.util.function.Function.MyMap?, out V of .MyMap?>) returnType:V of .MyMap [fake_override] + overridden: + public open fun computeIfAbsent (p0: @[FlexibleNullability] K of java.util.Map, p1: @[FlexibleNullability] java.util.function.Function): @[FlexibleNullability] V of java.util.Map declared in java.util.Map + $this: VALUE_PARAMETER name: type:java.util.Map + VALUE_PARAMETER name:p0 index:0 type:K of .MyMap + VALUE_PARAMETER name:p1 index:1 type:@[FlexibleNullability] java.util.function.Function.MyMap?, out V of .MyMap?> + FUN FAKE_OVERRIDE name:compute visibility:public modality:OPEN <> ($this:java.util.Map, p0:K of .MyMap, p1:@[FlexibleNullability] java.util.function.BiFunction.MyMap?, in V of .MyMap?, out V of .MyMap?>) returnType:V of .MyMap? [fake_override] + overridden: + public open fun compute (p0: @[FlexibleNullability] K of java.util.Map, p1: @[FlexibleNullability] java.util.function.BiFunction): @[FlexibleNullability] V of java.util.Map? declared in java.util.Map + $this: VALUE_PARAMETER name: type:java.util.Map + VALUE_PARAMETER name:p0 index:0 type:K of .MyMap + VALUE_PARAMETER name:p1 index:1 type:@[FlexibleNullability] java.util.function.BiFunction.MyMap?, in V of .MyMap?, out 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] overridden: public abstract fun containsKey (key: K of kotlin.collections.Map): kotlin.Boolean declared in kotlin.collections.Map @@ -101,6 +150,11 @@ FILE fqName: fileName:/AbstractMutableMap.kt overridden: public abstract fun (): kotlin.Int declared in kotlin.collections.Map $this: VALUE_PARAMETER name: type:kotlin.collections.Map + FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.util.Map, p0:@[FlexibleNullability] java.util.function.BiConsumer.MyMap?, in V of .MyMap?>) returnType:kotlin.Unit [fake_override] + overridden: + public open fun forEach (p0: @[FlexibleNullability] java.util.function.BiConsumer): kotlin.Unit declared in java.util.Map + $this: VALUE_PARAMETER name: type:java.util.Map + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.function.BiConsumer.MyMap?, in V of .MyMap?> FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any diff --git a/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.fir.kt.txt b/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.fir.kt.txt new file mode 100644 index 00000000000..31d5a81df78 --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.fir.kt.txt @@ -0,0 +1,85 @@ +interface SymbolOwner> { + +} + +interface Symbol> { + +} + +interface ReceiverValue { + abstract val type: String + abstract get + +} + +class ImplicitReceiverValue> : ReceiverValue { + constructor(boundSymbol: S?, type: String) /* primary */ { + super/*Any*/() + /* () */ + + } + + val boundSymbol: S? + field = boundSymbol + get + + override val type: String + field = type + override get + +} + +abstract class ImplicitReceiverStack : Iterable> { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + abstract operator fun get(name: String?): ImplicitReceiverValue<*>? + +} + +class PersistentImplicitReceiverStack : ImplicitReceiverStack, Iterable> { + constructor(stack: List>) /* primary */ { + super/*ImplicitReceiverStack*/() + /* () */ + + } + + private val stack: List> + field = stack + private get + + override operator fun iterator(): Iterator> { + return .().iterator() + } + + override operator fun get(name: String?): ImplicitReceiverValue<*>? { + return .().lastOrNull>() + } + +} + +fun bar(s: String) { +} + +fun foo(stack: PersistentImplicitReceiverStack) { + stack.forEach>(action = local fun (it: ImplicitReceiverValue<*>) { + it.() /*~> Unit */ + bar(s = it.()) + } +) +} + +fun box(): String { + val stack: PersistentImplicitReceiverStack = PersistentImplicitReceiverStack(stack = listOf>(elements = [ImplicitReceiverValue(boundSymbol = null, type = "O"), ImplicitReceiverValue(boundSymbol = null, type = "K")])) + foo(stack = stack) + return stack.first>().().plus(other = { // BLOCK + val tmp0_safe_receiver: ImplicitReceiverValue<*>? = stack.get(name = null) + when { + EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null + else -> tmp0_safe_receiver.() + } + }) +} diff --git a/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.fir.txt b/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.fir.txt new file mode 100644 index 00000000000..3be1f4a8686 --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.fir.txt @@ -0,0 +1,252 @@ +FILE fqName: fileName:/ImplicitReceiverStack.kt + CLASS INTERFACE name:SymbolOwner modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.SymbolOwner.SymbolOwner> + TYPE_PARAMETER name:E index:0 variance: superTypes:[.SymbolOwner.SymbolOwner>] + 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 INTERFACE name:Symbol modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Symbol.Symbol> + TYPE_PARAMETER name:E index:0 variance: superTypes:[.SymbolOwner.Symbol>] + 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 INTERFACE name:ReceiverValue modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.ReceiverValue + PROPERTY name:type visibility:public modality:ABSTRACT [val] + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT <> ($this:.ReceiverValue) returnType:kotlin.String + correspondingProperty: PROPERTY name:type visibility:public modality:ABSTRACT [val] + $this: VALUE_PARAMETER name: type:.ReceiverValue + 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:ImplicitReceiverValue modality:FINAL visibility:public superTypes:[.ReceiverValue] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.ImplicitReceiverValue.ImplicitReceiverValue> + TYPE_PARAMETER name:S index:0 variance: superTypes:[.Symbol<*>] + CONSTRUCTOR visibility:public <> (boundSymbol:S of .ImplicitReceiverValue?, type:kotlin.String) returnType:.ImplicitReceiverValue.ImplicitReceiverValue> [primary] + VALUE_PARAMETER name:boundSymbol index:0 type:S of .ImplicitReceiverValue? + VALUE_PARAMETER name:type index:1 type:kotlin.String + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:ImplicitReceiverValue modality:FINAL visibility:public superTypes:[.ReceiverValue]' + PROPERTY name:boundSymbol visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:boundSymbol type:S of .ImplicitReceiverValue? visibility:private [final] + EXPRESSION_BODY + GET_VAR 'boundSymbol: S of .ImplicitReceiverValue? declared in .ImplicitReceiverValue.' type=S of .ImplicitReceiverValue? origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.ImplicitReceiverValue.ImplicitReceiverValue>) returnType:S of .ImplicitReceiverValue? + correspondingProperty: PROPERTY name:boundSymbol visibility:public modality:FINAL [val] + $this: VALUE_PARAMETER name: type:.ImplicitReceiverValue.ImplicitReceiverValue> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): S of .ImplicitReceiverValue? declared in .ImplicitReceiverValue' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:boundSymbol type:S of .ImplicitReceiverValue? visibility:private [final]' type=S of .ImplicitReceiverValue? origin=null + receiver: GET_VAR ': .ImplicitReceiverValue.ImplicitReceiverValue> declared in .ImplicitReceiverValue.' type=.ImplicitReceiverValue.ImplicitReceiverValue> origin=null + PROPERTY name:type visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:type type:kotlin.String visibility:private [final] + EXPRESSION_BODY + GET_VAR 'type: kotlin.String declared in .ImplicitReceiverValue.' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.ImplicitReceiverValue.ImplicitReceiverValue>) returnType:kotlin.String + correspondingProperty: PROPERTY name:type visibility:public modality:FINAL [val] + overridden: + public abstract fun (): kotlin.String declared in .ReceiverValue + $this: VALUE_PARAMETER name: type:.ImplicitReceiverValue.ImplicitReceiverValue> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in .ImplicitReceiverValue' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:type type:kotlin.String visibility:private [final]' type=kotlin.String origin=null + receiver: GET_VAR ': .ImplicitReceiverValue.ImplicitReceiverValue> declared in .ImplicitReceiverValue.' type=.ImplicitReceiverValue.ImplicitReceiverValue> origin=null + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any + $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:ImplicitReceiverStack modality:ABSTRACT visibility:public superTypes:[kotlin.collections.Iterable<.ImplicitReceiverValue<*>>] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.ImplicitReceiverStack + CONSTRUCTOR visibility:public <> () returnType:.ImplicitReceiverStack [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:ImplicitReceiverStack modality:ABSTRACT visibility:public superTypes:[kotlin.collections.Iterable<.ImplicitReceiverValue<*>>]' + FUN name:get visibility:public modality:ABSTRACT <> ($this:.ImplicitReceiverStack, name:kotlin.String?) returnType:.ImplicitReceiverValue<*>? [operator] + $this: VALUE_PARAMETER name: type:.ImplicitReceiverStack + VALUE_PARAMETER name:name index:0 type:kotlin.String? + FUN FAKE_OVERRIDE name:iterator visibility:public modality:ABSTRACT <> ($this:kotlin.collections.Iterable) returnType:kotlin.collections.Iterator<.ImplicitReceiverValue<*>> [fake_override,operator] + overridden: + public abstract fun iterator (): kotlin.collections.Iterator [operator] declared in kotlin.collections.Iterable + $this: VALUE_PARAMETER name: type:kotlin.collections.Iterable + FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.lang.Iterable, p0:java.util.function.Consumer.ImplicitReceiverValue<*>?>?) returnType:kotlin.Unit [fake_override] + overridden: + public open fun forEach (p0: java.util.function.Consumer?): kotlin.Unit declared in java.lang.Iterable + $this: VALUE_PARAMETER name: type:java.lang.Iterable + VALUE_PARAMETER name:p0 index:0 type:java.util.function.Consumer.ImplicitReceiverValue<*>?>? + FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:java.lang.Iterable) returnType:@[FlexibleNullability] java.util.Spliterator<.ImplicitReceiverValue<*>?> [fake_override] + overridden: + public open fun spliterator (): @[FlexibleNullability] java.util.Spliterator declared in java.lang.Iterable + $this: VALUE_PARAMETER name: type:java.lang.Iterable + 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:PersistentImplicitReceiverStack modality:FINAL visibility:public superTypes:[.ImplicitReceiverStack; kotlin.collections.Iterable<.ImplicitReceiverValue<*>>] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.PersistentImplicitReceiverStack + CONSTRUCTOR visibility:public <> (stack:kotlin.collections.List<.ImplicitReceiverValue<*>>) returnType:.PersistentImplicitReceiverStack [primary] + VALUE_PARAMETER name:stack index:0 type:kotlin.collections.List<.ImplicitReceiverValue<*>> + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .ImplicitReceiverStack' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:PersistentImplicitReceiverStack modality:FINAL visibility:public superTypes:[.ImplicitReceiverStack; kotlin.collections.Iterable<.ImplicitReceiverValue<*>>]' + PROPERTY name:stack visibility:private modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:stack type:kotlin.collections.List<.ImplicitReceiverValue<*>> visibility:private [final] + EXPRESSION_BODY + GET_VAR 'stack: kotlin.collections.List<.ImplicitReceiverValue<*>> declared in .PersistentImplicitReceiverStack.' type=kotlin.collections.List<.ImplicitReceiverValue<*>> origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:private modality:FINAL <> ($this:.PersistentImplicitReceiverStack) returnType:kotlin.collections.List<.ImplicitReceiverValue<*>> + correspondingProperty: PROPERTY name:stack visibility:private modality:FINAL [val] + $this: VALUE_PARAMETER name: type:.PersistentImplicitReceiverStack + BLOCK_BODY + RETURN type=kotlin.Nothing from='private final fun (): kotlin.collections.List<.ImplicitReceiverValue<*>> declared in .PersistentImplicitReceiverStack' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:stack type:kotlin.collections.List<.ImplicitReceiverValue<*>> visibility:private [final]' type=kotlin.collections.List<.ImplicitReceiverValue<*>> origin=null + receiver: GET_VAR ': .PersistentImplicitReceiverStack declared in .PersistentImplicitReceiverStack.' type=.PersistentImplicitReceiverStack origin=null + FUN name:iterator visibility:public modality:FINAL <> ($this:.PersistentImplicitReceiverStack) returnType:kotlin.collections.Iterator<.ImplicitReceiverValue<*>> [operator] + overridden: + 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' + CALL 'public abstract fun iterator (): kotlin.collections.Iterator [operator] declared in kotlin.collections.List' type=kotlin.collections.Iterator<.ImplicitReceiverValue<*>> origin=null + $this: CALL 'private final fun (): kotlin.collections.List<.ImplicitReceiverValue<*>> declared in .PersistentImplicitReceiverStack' type=kotlin.collections.List<.ImplicitReceiverValue<*>> origin=GET_PROPERTY + $this: GET_VAR ': .PersistentImplicitReceiverStack declared in .PersistentImplicitReceiverStack.iterator' type=.PersistentImplicitReceiverStack origin=null + FUN name:get visibility:public modality:FINAL <> ($this:.PersistentImplicitReceiverStack, name:kotlin.String?) returnType:.ImplicitReceiverValue<*>? [operator] + overridden: + public abstract fun get (name: kotlin.String?): .ImplicitReceiverValue<*>? [operator] declared in .ImplicitReceiverStack + $this: VALUE_PARAMETER name: type:.PersistentImplicitReceiverStack + VALUE_PARAMETER name:name index:0 type:kotlin.String? + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun get (name: kotlin.String?): .ImplicitReceiverValue<*>? [operator] declared in .PersistentImplicitReceiverStack' + CALL 'public final fun lastOrNull (): T of kotlin.collections.lastOrNull? declared in kotlin.collections' type=.ImplicitReceiverValue<*>? origin=null + : .ImplicitReceiverValue<*> + $receiver: CALL 'private final fun (): kotlin.collections.List<.ImplicitReceiverValue<*>> declared in .PersistentImplicitReceiverStack' type=kotlin.collections.List<.ImplicitReceiverValue<*>> origin=GET_PROPERTY + $this: GET_VAR ': .PersistentImplicitReceiverStack declared in .PersistentImplicitReceiverStack.get' type=.PersistentImplicitReceiverStack origin=null + FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.lang.Iterable, p0:java.util.function.Consumer.ImplicitReceiverValue<*>?>?) returnType:kotlin.Unit [fake_override] + overridden: + public open fun forEach (p0: java.util.function.Consumer.ImplicitReceiverValue<*>?>?): kotlin.Unit [fake_override] declared in .ImplicitReceiverStack + public open fun forEach (p0: java.util.function.Consumer?): kotlin.Unit declared in kotlin.collections.Iterable + $this: VALUE_PARAMETER name: type:java.lang.Iterable + VALUE_PARAMETER name:p0 index:0 type:java.util.function.Consumer.ImplicitReceiverValue<*>?>? + FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:java.lang.Iterable) returnType:@[FlexibleNullability] java.util.Spliterator<.ImplicitReceiverValue<*>?> [fake_override] + overridden: + public open fun spliterator (): @[FlexibleNullability] java.util.Spliterator<.ImplicitReceiverValue<*>?> [fake_override] declared in .ImplicitReceiverStack + public open fun spliterator (): @[FlexibleNullability] java.util.Spliterator declared in kotlin.collections.Iterable + $this: VALUE_PARAMETER name: type:java.lang.Iterable + 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 + FUN name:bar visibility:public modality:FINAL <> (s:kotlin.String) returnType:kotlin.Unit + VALUE_PARAMETER name:s index:0 type:kotlin.String + BLOCK_BODY + FUN name:foo visibility:public modality:FINAL <> (stack:.PersistentImplicitReceiverStack) returnType:kotlin.Unit + VALUE_PARAMETER name:stack index:0 type:.PersistentImplicitReceiverStack + BLOCK_BODY + CALL 'public final fun forEach (action: kotlin.Function1): kotlin.Unit [inline] declared in kotlin.collections' type=kotlin.Unit origin=null + : .ImplicitReceiverValue<*> + $receiver: GET_VAR 'stack: .PersistentImplicitReceiverStack declared in .foo' type=.PersistentImplicitReceiverStack origin=null + action: FUN_EXPR type=kotlin.Function1<.ImplicitReceiverValue<*>, kotlin.Unit> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:.ImplicitReceiverValue<*>) returnType:kotlin.Unit + VALUE_PARAMETER name:it index:0 type:.ImplicitReceiverValue<*> + BLOCK_BODY + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + CALL 'public final fun (): S of .ImplicitReceiverValue? declared in .ImplicitReceiverValue' type=.Symbol<*>? origin=GET_PROPERTY + $this: GET_VAR 'it: .ImplicitReceiverValue<*> declared in .foo.' type=.ImplicitReceiverValue<*> origin=null + CALL 'public final fun bar (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null + s: CALL 'public final fun (): kotlin.String declared in .ImplicitReceiverValue' type=kotlin.String origin=GET_PROPERTY + $this: GET_VAR 'it: .ImplicitReceiverValue<*> declared in .foo.' type=.ImplicitReceiverValue<*> origin=null + FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String + BLOCK_BODY + VAR name:stack type:.PersistentImplicitReceiverStack [val] + CONSTRUCTOR_CALL 'public constructor (stack: kotlin.collections.List<.ImplicitReceiverValue<*>>) [primary] declared in .PersistentImplicitReceiverStack' type=.PersistentImplicitReceiverStack origin=null + stack: CALL 'public final fun listOf (vararg elements: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List<.ImplicitReceiverValue> origin=null + : .ImplicitReceiverValue + elements: VARARG type=kotlin.Array.ImplicitReceiverValue> varargElementType=.ImplicitReceiverValue + CONSTRUCTOR_CALL 'public constructor (boundSymbol: S of .ImplicitReceiverValue?, type: kotlin.String) [primary] declared in .ImplicitReceiverValue' type=.ImplicitReceiverValue origin=null + : kotlin.Nothing + boundSymbol: CONST Null type=kotlin.Nothing? value=null + type: CONST String type=kotlin.String value="O" + CONSTRUCTOR_CALL 'public constructor (boundSymbol: S of .ImplicitReceiverValue?, type: kotlin.String) [primary] declared in .ImplicitReceiverValue' type=.ImplicitReceiverValue origin=null + : kotlin.Nothing + boundSymbol: CONST Null type=kotlin.Nothing? value=null + type: CONST String type=kotlin.String value="K" + CALL 'public final fun foo (stack: .PersistentImplicitReceiverStack): kotlin.Unit declared in ' type=kotlin.Unit origin=null + stack: GET_VAR 'val stack: .PersistentImplicitReceiverStack [val] declared in .box' type=.PersistentImplicitReceiverStack origin=null + RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' + CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin.String' type=kotlin.String origin=PLUS + $this: CALL 'public final fun (): kotlin.String declared in .ImplicitReceiverValue' type=kotlin.String origin=GET_PROPERTY + $this: CALL 'public final fun first (): T of kotlin.collections.first declared in kotlin.collections' type=.ImplicitReceiverValue<*> origin=null + : .ImplicitReceiverValue<*> + $receiver: GET_VAR 'val stack: .PersistentImplicitReceiverStack [val] declared in .box' type=.PersistentImplicitReceiverStack origin=null + other: BLOCK type=kotlin.String? origin=SAFE_CALL + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:.ImplicitReceiverValue<*>? [val] + CALL 'public final fun get (name: kotlin.String?): .ImplicitReceiverValue<*>? [operator] declared in .PersistentImplicitReceiverStack' type=.ImplicitReceiverValue<*>? origin=null + $this: GET_VAR 'val stack: .PersistentImplicitReceiverStack [val] declared in .box' type=.PersistentImplicitReceiverStack origin=null + name: CONST Null type=kotlin.Nothing? value=null + WHEN type=kotlin.String? origin=null + BRANCH + if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ + arg0: GET_VAR 'val tmp_0: .ImplicitReceiverValue<*>? [val] declared in .box' type=.ImplicitReceiverValue<*>? origin=null + arg1: CONST Null type=kotlin.Nothing? value=null + then: CONST Null type=kotlin.Nothing? value=null + BRANCH + if: CONST Boolean type=kotlin.Boolean value=true + then: CALL 'public final fun (): kotlin.String declared in .ImplicitReceiverValue' type=kotlin.String origin=GET_PROPERTY + $this: GET_VAR 'val tmp_0: .ImplicitReceiverValue<*>? [val] declared in .box' type=.ImplicitReceiverValue<*>? origin=null diff --git a/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt b/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt new file mode 100644 index 00000000000..15b59886069 --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt @@ -0,0 +1,46 @@ +// WITH_RUNTIME +// FULL_JDK +// JVM_TARGET: 1.8 + +interface SymbolOwner> + +interface Symbol> + +interface ReceiverValue { + val type: String +} + +class ImplicitReceiverValue>(val boundSymbol: S?, override val type: String) : ReceiverValue + +abstract class ImplicitReceiverStack : Iterable> { + abstract operator fun get(name: String?): ImplicitReceiverValue<*>? +} + +class PersistentImplicitReceiverStack( + private val stack: List> +) : ImplicitReceiverStack(), Iterable> { + override operator fun iterator(): Iterator> { + return stack.iterator() + } + + override operator fun get(name: String?): ImplicitReceiverValue<*>? { + return stack.lastOrNull() + } +} + +fun bar(s: String) {} + +fun foo(stack: PersistentImplicitReceiverStack) { + stack.forEach { + it.boundSymbol + bar(it.type) + } +} + +fun box(): String { + val stack = PersistentImplicitReceiverStack( + listOf(ImplicitReceiverValue(null, "O"), ImplicitReceiverValue(null, "K")) + ) + foo(stack) + return stack.first().type + stack[null]?.type +} diff --git a/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt.txt b/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt.txt new file mode 100644 index 00000000000..31d5a81df78 --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt.txt @@ -0,0 +1,85 @@ +interface SymbolOwner> { + +} + +interface Symbol> { + +} + +interface ReceiverValue { + abstract val type: String + abstract get + +} + +class ImplicitReceiverValue> : ReceiverValue { + constructor(boundSymbol: S?, type: String) /* primary */ { + super/*Any*/() + /* () */ + + } + + val boundSymbol: S? + field = boundSymbol + get + + override val type: String + field = type + override get + +} + +abstract class ImplicitReceiverStack : Iterable> { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + abstract operator fun get(name: String?): ImplicitReceiverValue<*>? + +} + +class PersistentImplicitReceiverStack : ImplicitReceiverStack, Iterable> { + constructor(stack: List>) /* primary */ { + super/*ImplicitReceiverStack*/() + /* () */ + + } + + private val stack: List> + field = stack + private get + + override operator fun iterator(): Iterator> { + return .().iterator() + } + + override operator fun get(name: String?): ImplicitReceiverValue<*>? { + return .().lastOrNull>() + } + +} + +fun bar(s: String) { +} + +fun foo(stack: PersistentImplicitReceiverStack) { + stack.forEach>(action = local fun (it: ImplicitReceiverValue<*>) { + it.() /*~> Unit */ + bar(s = it.()) + } +) +} + +fun box(): String { + val stack: PersistentImplicitReceiverStack = PersistentImplicitReceiverStack(stack = listOf>(elements = [ImplicitReceiverValue(boundSymbol = null, type = "O"), ImplicitReceiverValue(boundSymbol = null, type = "K")])) + foo(stack = stack) + return stack.first>().().plus(other = { // BLOCK + val tmp0_safe_receiver: ImplicitReceiverValue<*>? = stack.get(name = null) + when { + EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null + else -> tmp0_safe_receiver.() + } + }) +} diff --git a/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.txt b/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.txt new file mode 100644 index 00000000000..2b363bfc8a8 --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.txt @@ -0,0 +1,256 @@ +FILE fqName: fileName:/ImplicitReceiverStack.kt + CLASS INTERFACE name:SymbolOwner modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.SymbolOwner.SymbolOwner> + TYPE_PARAMETER name:E index:0 variance: superTypes:[.SymbolOwner.SymbolOwner>] + 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 INTERFACE name:Symbol modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Symbol.Symbol> + TYPE_PARAMETER name:E index:0 variance: superTypes:[.SymbolOwner.Symbol>] + 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 INTERFACE name:ReceiverValue modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.ReceiverValue + PROPERTY name:type visibility:public modality:ABSTRACT [val] + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT <> ($this:.ReceiverValue) returnType:kotlin.String + correspondingProperty: PROPERTY name:type visibility:public modality:ABSTRACT [val] + $this: VALUE_PARAMETER name: type:.ReceiverValue + 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:ImplicitReceiverValue modality:FINAL visibility:public superTypes:[.ReceiverValue] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.ImplicitReceiverValue.ImplicitReceiverValue> + TYPE_PARAMETER name:S index:0 variance: superTypes:[.Symbol<*>] + CONSTRUCTOR visibility:public <> (boundSymbol:S of .ImplicitReceiverValue?, type:kotlin.String) returnType:.ImplicitReceiverValue.ImplicitReceiverValue> [primary] + VALUE_PARAMETER name:boundSymbol index:0 type:S of .ImplicitReceiverValue? + VALUE_PARAMETER name:type index:1 type:kotlin.String + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:ImplicitReceiverValue modality:FINAL visibility:public superTypes:[.ReceiverValue]' + PROPERTY name:boundSymbol visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:boundSymbol type:S of .ImplicitReceiverValue? visibility:private [final] + EXPRESSION_BODY + GET_VAR 'boundSymbol: S of .ImplicitReceiverValue? declared in .ImplicitReceiverValue.' type=S of .ImplicitReceiverValue? origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.ImplicitReceiverValue.ImplicitReceiverValue>) returnType:S of .ImplicitReceiverValue? + correspondingProperty: PROPERTY name:boundSymbol visibility:public modality:FINAL [val] + $this: VALUE_PARAMETER name: type:.ImplicitReceiverValue.ImplicitReceiverValue> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): S of .ImplicitReceiverValue? declared in .ImplicitReceiverValue' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:boundSymbol type:S of .ImplicitReceiverValue? visibility:private [final]' type=S of .ImplicitReceiverValue? origin=null + receiver: GET_VAR ': .ImplicitReceiverValue.ImplicitReceiverValue> declared in .ImplicitReceiverValue.' type=.ImplicitReceiverValue.ImplicitReceiverValue> origin=null + PROPERTY name:type visibility:public modality:OPEN [val] + FIELD PROPERTY_BACKING_FIELD name:type type:kotlin.String visibility:private [final] + EXPRESSION_BODY + GET_VAR 'type: kotlin.String declared in .ImplicitReceiverValue.' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN <> ($this:.ImplicitReceiverValue.ImplicitReceiverValue>) returnType:kotlin.String + correspondingProperty: PROPERTY name:type visibility:public modality:OPEN [val] + overridden: + public abstract fun (): kotlin.String declared in .ReceiverValue + $this: VALUE_PARAMETER name: type:.ImplicitReceiverValue.ImplicitReceiverValue> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun (): kotlin.String declared in .ImplicitReceiverValue' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:type type:kotlin.String visibility:private [final]' type=kotlin.String origin=null + receiver: GET_VAR ': .ImplicitReceiverValue.ImplicitReceiverValue> declared in .ImplicitReceiverValue.' type=.ImplicitReceiverValue.ImplicitReceiverValue> 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 .ReceiverValue + $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 .ReceiverValue + $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 .ReceiverValue + $this: VALUE_PARAMETER name: type:kotlin.Any + CLASS CLASS name:ImplicitReceiverStack modality:ABSTRACT visibility:public superTypes:[kotlin.collections.Iterable<.ImplicitReceiverValue<*>>] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.ImplicitReceiverStack + CONSTRUCTOR visibility:public <> () returnType:.ImplicitReceiverStack [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:ImplicitReceiverStack modality:ABSTRACT visibility:public superTypes:[kotlin.collections.Iterable<.ImplicitReceiverValue<*>>]' + FUN name:get visibility:public modality:ABSTRACT <> ($this:.ImplicitReceiverStack, name:kotlin.String?) returnType:.ImplicitReceiverValue<*>? [operator] + $this: VALUE_PARAMETER name: type:.ImplicitReceiverStack + VALUE_PARAMETER name:name index:0 type:kotlin.String? + FUN FAKE_OVERRIDE name:iterator visibility:public modality:ABSTRACT <> ($this:kotlin.collections.Iterable<.ImplicitReceiverValue<*>>) returnType:kotlin.collections.Iterator<.ImplicitReceiverValue<*>> [fake_override,operator] + overridden: + public abstract fun iterator (): kotlin.collections.Iterator [operator] declared in kotlin.collections.Iterable + $this: VALUE_PARAMETER name: type:kotlin.collections.Iterable<.ImplicitReceiverValue<*>> + 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.Iterable + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:kotlin.collections.Iterable<.ImplicitReceiverValue<*>>, p0:@[FlexibleNullability] java.util.function.Consumer.ImplicitReceiverValue<*>?>?) returnType:kotlin.Unit [fake_override] + overridden: + 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<.ImplicitReceiverValue<*>> + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.function.Consumer.ImplicitReceiverValue<*>?>? + 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.Iterable + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:kotlin.collections.Iterable<.ImplicitReceiverValue<*>>) returnType:@[EnhancedNullability] java.util.Spliterator<@[EnhancedNullability] .ImplicitReceiverValue<*>> [fake_override] + overridden: + public open fun spliterator (): @[EnhancedNullability] java.util.Spliterator<@[EnhancedNullability] T of kotlin.collections.Iterable> declared in kotlin.collections.Iterable + $this: VALUE_PARAMETER name: type:kotlin.collections.Iterable<.ImplicitReceiverValue<*>> + 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.Iterable + $this: VALUE_PARAMETER name: type:kotlin.Any + CLASS CLASS name:PersistentImplicitReceiverStack modality:FINAL visibility:public superTypes:[.ImplicitReceiverStack; kotlin.collections.Iterable<.ImplicitReceiverValue<*>>] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.PersistentImplicitReceiverStack + CONSTRUCTOR visibility:public <> (stack:kotlin.collections.List<.ImplicitReceiverValue<*>>) returnType:.PersistentImplicitReceiverStack [primary] + VALUE_PARAMETER name:stack index:0 type:kotlin.collections.List<.ImplicitReceiverValue<*>> + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .ImplicitReceiverStack' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:PersistentImplicitReceiverStack modality:FINAL visibility:public superTypes:[.ImplicitReceiverStack; kotlin.collections.Iterable<.ImplicitReceiverValue<*>>]' + PROPERTY name:stack visibility:private modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:stack type:kotlin.collections.List<.ImplicitReceiverValue<*>> visibility:private [final] + EXPRESSION_BODY + GET_VAR 'stack: kotlin.collections.List<.ImplicitReceiverValue<*>> declared in .PersistentImplicitReceiverStack.' type=kotlin.collections.List<.ImplicitReceiverValue<*>> origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:private modality:FINAL <> ($this:.PersistentImplicitReceiverStack) returnType:kotlin.collections.List<.ImplicitReceiverValue<*>> + correspondingProperty: PROPERTY name:stack visibility:private modality:FINAL [val] + $this: VALUE_PARAMETER name: type:.PersistentImplicitReceiverStack + BLOCK_BODY + RETURN type=kotlin.Nothing from='private final fun (): kotlin.collections.List<.ImplicitReceiverValue<*>> declared in .PersistentImplicitReceiverStack' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:stack type:kotlin.collections.List<.ImplicitReceiverValue<*>> visibility:private [final]' type=kotlin.collections.List<.ImplicitReceiverValue<*>> origin=null + receiver: GET_VAR ': .PersistentImplicitReceiverStack declared in .PersistentImplicitReceiverStack.' type=.PersistentImplicitReceiverStack origin=null + FUN name:iterator visibility:public modality:OPEN <> ($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 open fun iterator (): kotlin.collections.Iterator<.ImplicitReceiverValue<*>> [operator] declared in .PersistentImplicitReceiverStack' + CALL 'public abstract fun iterator (): kotlin.collections.Iterator [operator] declared in kotlin.collections.List' type=kotlin.collections.Iterator<.ImplicitReceiverValue<*>> origin=null + $this: CALL 'private final fun (): kotlin.collections.List<.ImplicitReceiverValue<*>> declared in .PersistentImplicitReceiverStack' type=kotlin.collections.List<.ImplicitReceiverValue<*>> origin=GET_PROPERTY + $this: GET_VAR ': .PersistentImplicitReceiverStack declared in .PersistentImplicitReceiverStack.iterator' type=.PersistentImplicitReceiverStack origin=null + FUN name:get visibility:public modality:OPEN <> ($this:.PersistentImplicitReceiverStack, name:kotlin.String?) returnType:.ImplicitReceiverValue<*>? [operator] + overridden: + public abstract fun get (name: kotlin.String?): .ImplicitReceiverValue<*>? [operator] declared in .ImplicitReceiverStack + $this: VALUE_PARAMETER name: type:.PersistentImplicitReceiverStack + VALUE_PARAMETER name:name index:0 type:kotlin.String? + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun get (name: kotlin.String?): .ImplicitReceiverValue<*>? [operator] declared in .PersistentImplicitReceiverStack' + CALL 'public final fun lastOrNull (): T of kotlin.collections.lastOrNull? declared in kotlin.collections' type=.ImplicitReceiverValue<*>? origin=null + : .ImplicitReceiverValue<*> + $receiver: CALL 'private final fun (): kotlin.collections.List<.ImplicitReceiverValue<*>> declared in .PersistentImplicitReceiverStack' type=kotlin.collections.List<.ImplicitReceiverValue<*>> origin=GET_PROPERTY + $this: GET_VAR ': .PersistentImplicitReceiverStack declared in .PersistentImplicitReceiverStack.get' type=.PersistentImplicitReceiverStack 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 .ImplicitReceiverStack + public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.collections.Iterable + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:kotlin.collections.Iterable<.ImplicitReceiverValue<*>>, 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<.ImplicitReceiverValue<*>> + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.function.Consumer.ImplicitReceiverValue<*>?>? + 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 .ImplicitReceiverStack + public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.collections.Iterable + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:kotlin.collections.Iterable<.ImplicitReceiverValue<*>>) returnType:@[EnhancedNullability] java.util.Spliterator<@[EnhancedNullability] .ImplicitReceiverValue<*>> [fake_override] + overridden: + public open fun spliterator (): @[EnhancedNullability] java.util.Spliterator<@[EnhancedNullability] .ImplicitReceiverValue<*>> [fake_override] declared in .ImplicitReceiverStack + public open fun spliterator (): @[EnhancedNullability] java.util.Spliterator<@[EnhancedNullability] T of kotlin.collections.Iterable> declared in kotlin.collections.Iterable + $this: VALUE_PARAMETER name: type:kotlin.collections.Iterable<.ImplicitReceiverValue<*>> + 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 .ImplicitReceiverStack + public open fun toString (): kotlin.String [fake_override] declared in kotlin.collections.Iterable + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN name:bar visibility:public modality:FINAL <> (s:kotlin.String) returnType:kotlin.Unit + VALUE_PARAMETER name:s index:0 type:kotlin.String + BLOCK_BODY + FUN name:foo visibility:public modality:FINAL <> (stack:.PersistentImplicitReceiverStack) returnType:kotlin.Unit + VALUE_PARAMETER name:stack index:0 type:.PersistentImplicitReceiverStack + BLOCK_BODY + CALL 'public final fun forEach (action: kotlin.Function1): kotlin.Unit [inline] declared in kotlin.collections' type=kotlin.Unit origin=null + : .ImplicitReceiverValue<*> + $receiver: GET_VAR 'stack: .PersistentImplicitReceiverStack declared in .foo' type=.PersistentImplicitReceiverStack origin=null + action: FUN_EXPR type=kotlin.Function1<.ImplicitReceiverValue<*>, kotlin.Unit> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:.ImplicitReceiverValue<*>) returnType:kotlin.Unit + VALUE_PARAMETER name:it index:0 type:.ImplicitReceiverValue<*> + BLOCK_BODY + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + CALL 'public final fun (): S of .ImplicitReceiverValue? declared in .ImplicitReceiverValue' type=.Symbol<*>? origin=GET_PROPERTY + $this: GET_VAR 'it: .ImplicitReceiverValue<*> declared in .foo.' type=.ImplicitReceiverValue<*> origin=null + CALL 'public final fun bar (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null + s: CALL 'public open fun (): kotlin.String declared in .ImplicitReceiverValue' type=kotlin.String origin=GET_PROPERTY + $this: GET_VAR 'it: .ImplicitReceiverValue<*> declared in .foo.' type=.ImplicitReceiverValue<*> origin=null + FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String + BLOCK_BODY + VAR name:stack type:.PersistentImplicitReceiverStack [val] + CONSTRUCTOR_CALL 'public constructor (stack: kotlin.collections.List<.ImplicitReceiverValue<*>>) [primary] declared in .PersistentImplicitReceiverStack' type=.PersistentImplicitReceiverStack origin=null + stack: CALL 'public final fun listOf (vararg elements: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List<.ImplicitReceiverValue> origin=null + : .ImplicitReceiverValue + elements: VARARG type=kotlin.Array.ImplicitReceiverValue> varargElementType=.ImplicitReceiverValue + CONSTRUCTOR_CALL 'public constructor (boundSymbol: S of .ImplicitReceiverValue?, type: kotlin.String) [primary] declared in .ImplicitReceiverValue' type=.ImplicitReceiverValue origin=null + : kotlin.Nothing + boundSymbol: CONST Null type=kotlin.Nothing? value=null + type: CONST String type=kotlin.String value="O" + CONSTRUCTOR_CALL 'public constructor (boundSymbol: S of .ImplicitReceiverValue?, type: kotlin.String) [primary] declared in .ImplicitReceiverValue' type=.ImplicitReceiverValue origin=null + : kotlin.Nothing + boundSymbol: CONST Null type=kotlin.Nothing? value=null + type: CONST String type=kotlin.String value="K" + CALL 'public final fun foo (stack: .PersistentImplicitReceiverStack): kotlin.Unit declared in ' type=kotlin.Unit origin=null + stack: GET_VAR 'val stack: .PersistentImplicitReceiverStack [val] declared in .box' type=.PersistentImplicitReceiverStack origin=null + RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' + CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin.String' type=kotlin.String origin=PLUS + $this: CALL 'public open fun (): kotlin.String declared in .ImplicitReceiverValue' type=kotlin.String origin=GET_PROPERTY + $this: CALL 'public final fun first (): T of kotlin.collections.first declared in kotlin.collections' type=.ImplicitReceiverValue<*> origin=null + : .ImplicitReceiverValue<*> + $receiver: GET_VAR 'val stack: .PersistentImplicitReceiverStack [val] declared in .box' type=.PersistentImplicitReceiverStack origin=null + other: BLOCK type=kotlin.String? origin=SAFE_CALL + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:.ImplicitReceiverValue<*>? [val] + CALL 'public open fun get (name: kotlin.String?): .ImplicitReceiverValue<*>? [operator] declared in .PersistentImplicitReceiverStack' type=.ImplicitReceiverValue<*>? origin=GET_ARRAY_ELEMENT + $this: GET_VAR 'val stack: .PersistentImplicitReceiverStack [val] declared in .box' type=.PersistentImplicitReceiverStack origin=null + name: CONST Null type=kotlin.Nothing? value=null + WHEN type=kotlin.String? origin=null + BRANCH + if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ + arg0: GET_VAR 'val tmp_0: .ImplicitReceiverValue<*>? [val] declared in .box' type=.ImplicitReceiverValue<*>? origin=null + arg1: CONST Null type=kotlin.Nothing? value=null + then: CONST Null type=kotlin.Nothing? value=null + BRANCH + if: CONST Boolean type=kotlin.Boolean value=true + then: CALL 'public open fun (): kotlin.String declared in .ImplicitReceiverValue' type=kotlin.String origin=GET_PROPERTY + $this: GET_VAR 'val tmp_0: .ImplicitReceiverValue<*>? [val] declared in .box' type=.ImplicitReceiverValue<*>? origin=null diff --git a/compiler/testData/ir/irText/firProblems/MultiList.fir.txt b/compiler/testData/ir/irText/firProblems/MultiList.fir.txt index 7dcc48ba3f5..c682c9524ee 100644 --- a/compiler/testData/ir/irText/firProblems/MultiList.fir.txt +++ b/compiler/testData/ir/irText/firProblems/MultiList.fir.txt @@ -156,6 +156,23 @@ FILE fqName: fileName:/MultiList.kt overridden: public abstract fun (): kotlin.Int declared in kotlin.collections.List $this: VALUE_PARAMETER name: type:kotlin.collections.List + FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[FlexibleNullability] java.util.Spliterator<.Some.MyList>?> [fake_override] + overridden: + public open fun spliterator (): @[FlexibleNullability] java.util.Spliterator declared in java.util.Collection + $this: VALUE_PARAMETER name: type:java.util.Collection + FUN FAKE_OVERRIDE name:parallelStream visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[FlexibleNullability] java.util.stream.Stream<.Some.MyList>?> [fake_override] + overridden: + public open fun parallelStream (): @[FlexibleNullability] java.util.stream.Stream declared in java.util.Collection + $this: VALUE_PARAMETER name: type:java.util.Collection + FUN FAKE_OVERRIDE name:stream visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[FlexibleNullability] java.util.stream.Stream<.Some.MyList>?> [fake_override] + overridden: + public open fun stream (): @[FlexibleNullability] java.util.stream.Stream declared in java.util.Collection + $this: VALUE_PARAMETER name: type:java.util.Collection + FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.lang.Iterable, p0:java.util.function.Consumer.Some.MyList>?>?) returnType:kotlin.Unit [fake_override] + overridden: + public open fun forEach (p0: java.util.function.Consumer?): kotlin.Unit declared in java.lang.Iterable + $this: VALUE_PARAMETER name: type:java.lang.Iterable + VALUE_PARAMETER name:p0 index:0 type:java.util.function.Consumer.Some.MyList>?>? 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 @@ -246,6 +263,27 @@ FILE fqName: fileName:/MultiList.kt public abstract fun (): kotlin.Int declared in kotlin.collections.List public abstract 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:java.util.Collection) returnType:@[FlexibleNullability] java.util.Spliterator<.Some.SomeList>?> [fake_override] + overridden: + public open fun spliterator (): @[FlexibleNullability] java.util.Spliterator<.Some.MyList>?> [fake_override] declared in .MyList + public open fun spliterator (): @[FlexibleNullability] java.util.Spliterator declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.Collection + FUN FAKE_OVERRIDE name:parallelStream visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[FlexibleNullability] java.util.stream.Stream<.Some.SomeList>?> [fake_override] + overridden: + public open fun parallelStream (): @[FlexibleNullability] java.util.stream.Stream<.Some.MyList>?> [fake_override] declared in .MyList + public open fun parallelStream (): @[FlexibleNullability] java.util.stream.Stream<@[FlexibleNullability] E of java.util.ArrayList?> declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.Collection + FUN FAKE_OVERRIDE name:stream visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[FlexibleNullability] java.util.stream.Stream<.Some.SomeList>?> [fake_override] + overridden: + public open fun stream (): @[FlexibleNullability] java.util.stream.Stream<.Some.MyList>?> [fake_override] declared in .MyList + public open fun stream (): @[FlexibleNullability] java.util.stream.Stream<@[FlexibleNullability] E of java.util.ArrayList?> declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.Collection + FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.lang.Iterable, p0:java.util.function.Consumer.Some.SomeList>?>?) returnType:kotlin.Unit [fake_override] + overridden: + public open fun forEach (p0: java.util.function.Consumer.Some.MyList>?>?): kotlin.Unit [fake_override] declared in .MyList + public open fun forEach (p0: java.util.function.Consumer?): kotlin.Unit declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.lang.Iterable + VALUE_PARAMETER name:p0 index:0 type: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] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any @@ -348,17 +386,6 @@ FILE fqName: fileName:/MultiList.kt public open fun retainAll (p0: kotlin.collections.Collection): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<.Some.SomeList>> - FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.lang.Iterable, p0:java.util.function.Consumer.Some.SomeList>?>?) returnType:kotlin.Unit [fake_override] - overridden: - public open fun forEach (p0: java.util.function.Consumer.Some.MyList>?>?): kotlin.Unit declared in .MyList - public open fun forEach (p0: java.util.function.Consumer?): kotlin.Unit declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:java.lang.Iterable - VALUE_PARAMETER name:p0 index:0 type:java.util.function.Consumer.Some.SomeList>?>? - FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[FlexibleNullability] java.util.Spliterator<.Some.SomeList>?> [fake_override] - overridden: - public open fun spliterator (): @[FlexibleNullability] java.util.Spliterator<.Some.MyList>?> declared in .MyList - public open fun spliterator (): @[FlexibleNullability] java.util.Spliterator declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:java.util.Collection FUN FAKE_OVERRIDE name:removeIf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:java.util.function.Predicate.Some.SomeList>?>?) returnType:kotlin.Boolean [fake_override] overridden: public open fun removeIf (p0: java.util.function.Predicate?): kotlin.Boolean declared in java.util.ArrayList @@ -446,6 +473,23 @@ FILE fqName: fileName:/MultiList.kt public abstract fun (): kotlin.Int declared in kotlin.collections.List public abstract 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:java.util.Collection) returnType:@[FlexibleNullability] java.util.Spliterator<.Some?> [fake_override] + overridden: + public open fun spliterator (): @[FlexibleNullability] java.util.Spliterator declared in java.util.Collection + $this: VALUE_PARAMETER name: type:java.util.Collection + FUN FAKE_OVERRIDE name:parallelStream visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[FlexibleNullability] java.util.stream.Stream<.Some?> [fake_override] + overridden: + public open fun parallelStream (): @[FlexibleNullability] java.util.stream.Stream declared in java.util.Collection + $this: VALUE_PARAMETER name: type:java.util.Collection + FUN FAKE_OVERRIDE name:stream visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[FlexibleNullability] java.util.stream.Stream<.Some?> [fake_override] + overridden: + public open fun stream (): @[FlexibleNullability] java.util.stream.Stream declared in java.util.Collection + $this: VALUE_PARAMETER name: type:java.util.Collection + FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.lang.Iterable, p0:java.util.function.Consumer.Some?>?) returnType:kotlin.Unit [fake_override] + overridden: + public open fun forEach (p0: java.util.function.Consumer?): kotlin.Unit declared in java.lang.Iterable + $this: VALUE_PARAMETER name: type:java.lang.Iterable + VALUE_PARAMETER name:p0 index:0 type: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] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any @@ -548,15 +592,6 @@ FILE fqName: fileName:/MultiList.kt public open fun retainAll (p0: kotlin.collections.Collection): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<.Some> - FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.lang.Iterable, p0:java.util.function.Consumer.Some?>?) returnType:kotlin.Unit [fake_override] - overridden: - public open fun forEach (p0: java.util.function.Consumer?): kotlin.Unit declared in java.lang.Iterable - $this: VALUE_PARAMETER name: type:java.lang.Iterable - VALUE_PARAMETER name:p0 index:0 type:java.util.function.Consumer.Some?>? - FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[FlexibleNullability] java.util.Spliterator<.Some?> [fake_override] - overridden: - public open fun spliterator (): @[FlexibleNullability] java.util.Spliterator declared in java.util.Collection - $this: VALUE_PARAMETER name: type:java.util.Collection FUN FAKE_OVERRIDE name:removeIf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:java.util.function.Predicate.Some?>?) returnType:kotlin.Boolean [fake_override] overridden: public open fun removeIf (p0: java.util.function.Predicate?): kotlin.Boolean declared in java.util.ArrayList diff --git a/compiler/tests-gen/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java index 5b81fdc7934..a6d46b7c275 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/FirBuilder.kt"); } + @TestMetadata("ImplicitReceiverStack.kt") + public void testImplicitReceiverStack() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt"); + } + @TestMetadata("inapplicableCollectionSet.kt") public void testInapplicableCollectionSet() throws Exception { runTest("compiler/testData/ir/irText/firProblems/inapplicableCollectionSet.kt");