diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrBuiltIns.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrBuiltIns.kt index c2b304cb28f..e9f7669eb2a 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrBuiltIns.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrBuiltIns.kt @@ -37,6 +37,13 @@ class Fir2IrBuiltIns( internal fun flexibleNullabilityAnnotationConstructorCall(): IrConstructorCall? = flexibleNullabilityAnnotationSymbol?.toConstructorCall() + private val extensionFunctionTypeAnnotationSymbol by lazy { + annotationSymbolById(StandardClassIds.Annotations.ExtensionFunctionType) + } + + internal fun extensionFunctionTypeAnnotationConstructorCall(): IrConstructorCall? = + extensionFunctionTypeAnnotationSymbol?.toConstructorCall() + private fun annotationSymbolById(id: ClassId): IrClassSymbol? = provider?.getClassSymbolById(id) ?: session.symbolProvider.getClassLikeSymbolByClassId(id)?.toSymbol( session, classifierStorage, ConversionTypeContext.DEFAULT diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrTypeConverter.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrTypeConverter.kt index f9919b223f1..a9f0b0355bb 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrTypeConverter.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrTypeConverter.kt @@ -5,6 +5,7 @@ package org.jetbrains.kotlin.fir.backend +import org.jetbrains.kotlin.fir.declarations.getAnnotationsByClassId import org.jetbrains.kotlin.fir.expressions.FirAnnotation import org.jetbrains.kotlin.fir.expressions.classId import org.jetbrains.kotlin.fir.languageVersionSettings @@ -121,6 +122,13 @@ class Fir2IrTypeConverter( typeAnnotations += it } } + isExtensionFunctionType -> { + if (annotations.getAnnotationsByClassId(StandardClassIds.Annotations.ExtensionFunctionType).isEmpty()) { + builtIns.extensionFunctionTypeAnnotationConstructorCall()?.let { + typeAnnotations += it + } + } + } hasFlexibleNullability -> { builtIns.flexibleNullabilityAnnotationConstructorCall()?.let { typeAnnotations += it diff --git a/compiler/testData/codegen/box/fir/noSymbolForIntRangeIterator.fir.ir.txt b/compiler/testData/codegen/box/fir/noSymbolForIntRangeIterator.fir.ir.txt index 6b756225ee4..52b95b24fa4 100644 --- a/compiler/testData/codegen/box/fir/noSymbolForIntRangeIterator.fir.ir.txt +++ b/compiler/testData/codegen/box/fir/noSymbolForIntRangeIterator.fir.ir.txt @@ -67,7 +67,7 @@ FILE fqName: fileName:/noSymbolForIntRangeIterator.kt BLOCK type=kotlin.Unit origin=null VAR name:s type:kotlin.String [val] CALL 'public final fun buildString (builderAction: @[ExtensionFunctionType] kotlin.Function1): kotlin.String [inline] declared in kotlin.text.StringsKt' type=kotlin.String origin=null - builderAction: FUN_EXPR type=kotlin.Function1 origin=LAMBDA + builderAction: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:java.lang.StringBuilder) returnType:kotlin.Unit $receiver: VALUE_PARAMETER name:$this$buildString type:java.lang.StringBuilder BLOCK_BODY diff --git a/compiler/testData/ir/irText/classes/initValInLambda.fir.ir.txt b/compiler/testData/ir/irText/classes/initValInLambda.fir.ir.txt deleted file mode 100644 index 236ead7c1b4..00000000000 --- a/compiler/testData/ir/irText/classes/initValInLambda.fir.ir.txt +++ /dev/null @@ -1,42 +0,0 @@ -FILE fqName: fileName:/initValInLambda.kt - CLASS CLASS name:TestInitValInLambdaCalledOnce modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestInitValInLambdaCalledOnce - CONSTRUCTOR visibility:public <> () returnType:.TestInitValInLambdaCalledOnce [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestInitValInLambdaCalledOnce modality:FINAL visibility:public superTypes:[kotlin.Any]' - PROPERTY name:x visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final] - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.TestInitValInLambdaCalledOnce) returnType:kotlin.Int - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.TestInitValInLambdaCalledOnce - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .TestInitValInLambdaCalledOnce' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .TestInitValInLambdaCalledOnce declared in .TestInitValInLambdaCalledOnce.' type=.TestInitValInLambdaCalledOnce origin=null - ANONYMOUS_INITIALIZER isStatic=false - BLOCK_BODY - CALL 'public final fun run (block: @[ExtensionFunctionType] kotlin.Function1): R of kotlin.StandardKt.run [inline] declared in kotlin.StandardKt' type=kotlin.Unit origin=null - : kotlin.Int - : kotlin.Unit - $receiver: CONST Int type=kotlin.Int value=1 - block: FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:kotlin.Int) returnType:kotlin.Unit - $receiver: VALUE_PARAMETER name:$this$run type:kotlin.Int - BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Unit origin=null - receiver: GET_VAR ': .TestInitValInLambdaCalledOnce declared in .TestInitValInLambdaCalledOnce' type=.TestInitValInLambdaCalledOnce origin=null - value: CONST Int type=kotlin.Int value=0 - 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/classes/initValInLambda.fir.kt.txt b/compiler/testData/ir/irText/classes/initValInLambda.fir.kt.txt deleted file mode 100644 index 727822427ed..00000000000 --- a/compiler/testData/ir/irText/classes/initValInLambda.fir.kt.txt +++ /dev/null @@ -1,18 +0,0 @@ -class TestInitValInLambdaCalledOnce { - constructor() /* primary */ { - super/*Any*/() - /* () */ - - } - - val x: Int - get - - init { - 1.run(block = local fun Int.() { - .#x = 0 - } -) - } - -} diff --git a/compiler/testData/ir/irText/classes/initValInLambda.kt b/compiler/testData/ir/irText/classes/initValInLambda.kt index e2caa979ed2..36f1dd7c226 100644 --- a/compiler/testData/ir/irText/classes/initValInLambda.kt +++ b/compiler/testData/ir/irText/classes/initValInLambda.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL class TestInitValInLambdaCalledOnce { val x: Int init { diff --git a/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.fir.ir.txt b/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.fir.ir.txt index 43d469be2e7..b160ff23930 100644 --- a/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.fir.ir.txt +++ b/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.fir.ir.txt @@ -4,7 +4,7 @@ FILE fqName: fileName:/lambdaInDataClassDefaultParameter.kt CONSTRUCTOR visibility:public <> (runA:@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit>) returnType:.A [primary] VALUE_PARAMETER name:runA index:0 type:@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> EXPRESSION_BODY - FUN_EXPR type=kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=LAMBDA + FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.A, it:kotlin.String) returnType:kotlin.Unit $receiver: VALUE_PARAMETER name: type:.A VALUE_PARAMETER name:it index:0 type:kotlin.String diff --git a/compiler/testData/ir/irText/declarations/parameters/lambdas.fir.ir.txt b/compiler/testData/ir/irText/declarations/parameters/lambdas.fir.ir.txt index f197f5d6892..d87697f7ae9 100644 --- a/compiler/testData/ir/irText/declarations/parameters/lambdas.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/parameters/lambdas.fir.ir.txt @@ -16,7 +16,7 @@ FILE fqName: fileName:/lambdas.kt PROPERTY name:test2 visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:test2 type:@[ExtensionFunctionType] kotlin.Function2 visibility:private [final,static] EXPRESSION_BODY - FUN_EXPR type=kotlin.Function2 origin=LAMBDA + FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function2 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:kotlin.Any, it:kotlin.Any) returnType:kotlin.Int $receiver: VALUE_PARAMETER name: type:kotlin.Any VALUE_PARAMETER name:it index:0 type:kotlin.Any diff --git a/compiler/testData/ir/irText/expressions/kt37570.fir.ir.txt b/compiler/testData/ir/irText/expressions/kt37570.fir.ir.txt deleted file mode 100644 index b448ab99eb9..00000000000 --- a/compiler/testData/ir/irText/expressions/kt37570.fir.ir.txt +++ /dev/null @@ -1,46 +0,0 @@ -FILE fqName: fileName:/kt37570.kt - FUN name:a visibility:public modality:FINAL <> () returnType:kotlin.String - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun a (): kotlin.String declared in ' - CONST String type=kotlin.String value="string" - CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A - CONSTRUCTOR visibility:public <> () returnType:.A [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' - PROPERTY name:b visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:b type:kotlin.String visibility:private [final] - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.A) returnType:kotlin.String - correspondingProperty: PROPERTY name:b visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.A - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in .A' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:kotlin.String visibility:private [final]' type=kotlin.String origin=null - receiver: GET_VAR ': .A declared in .A.' type=.A origin=null - ANONYMOUS_INITIALIZER isStatic=false - BLOCK_BODY - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public final fun apply (block: @[ExtensionFunctionType] kotlin.Function1): T of kotlin.StandardKt.apply [inline] declared in kotlin.StandardKt' type=kotlin.String origin=null - : kotlin.String - $receiver: CALL 'public final fun a (): kotlin.String declared in ' type=kotlin.String origin=null - block: FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:kotlin.String) returnType:kotlin.Unit - $receiver: VALUE_PARAMETER name:$this$apply type:kotlin.String - BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:kotlin.String visibility:private [final]' type=kotlin.Unit origin=null - receiver: GET_VAR ': .A declared in .A' type=.A origin=null - value: GET_VAR '$this$apply: kotlin.String declared in .A.' type=kotlin.String 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 diff --git a/compiler/testData/ir/irText/expressions/kt37570.fir.kt.txt b/compiler/testData/ir/irText/expressions/kt37570.fir.kt.txt deleted file mode 100644 index ed1901631b0..00000000000 --- a/compiler/testData/ir/irText/expressions/kt37570.fir.kt.txt +++ /dev/null @@ -1,23 +0,0 @@ -fun a(): String { - return "string" -} - -class A { - constructor() /* primary */ { - super/*Any*/() - /* () */ - - } - - val b: String - get - - init { - a().apply(block = local fun String.() { - .#b = $this$apply - } -) /*~> Unit */ - } - -} - diff --git a/compiler/testData/ir/irText/expressions/kt37570.kt b/compiler/testData/ir/irText/expressions/kt37570.kt index 09e25f12257..d385075668b 100644 --- a/compiler/testData/ir/irText/expressions/kt37570.kt +++ b/compiler/testData/ir/irText/expressions/kt37570.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL fun a() = "string" class A { diff --git a/compiler/testData/ir/irText/expressions/kt47082.fir.ir.txt b/compiler/testData/ir/irText/expressions/kt47082.fir.ir.txt index edeac2f00e0..3ef1b649c56 100644 --- a/compiler/testData/ir/irText/expressions/kt47082.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/kt47082.fir.ir.txt @@ -72,7 +72,7 @@ FILE fqName: fileName:/kt47082.kt RETURN type=kotlin.Nothing from='public final fun foo (r: .Receiver.foo>): R of .foo declared in ' CALL 'public final fun produce (block: @[ExtensionFunctionType] kotlin.Function1<.Derived.produce>, kotlin.Unit>): E of .produce declared in ' type=R of .foo origin=null : R of .foo - block: FUN_EXPR type=kotlin.Function1<.Derived, kotlin.Unit> origin=LAMBDA + block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<.Derived, kotlin.Unit> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.Derived) returnType:kotlin.Unit $receiver: VALUE_PARAMETER name:$this$produce type:.Derived BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/suspendConversionOnArbitraryExpression.fir.ir.txt b/compiler/testData/ir/irText/expressions/suspendConversionOnArbitraryExpression.fir.ir.txt index 09cebecbb93..111a6f5687a 100644 --- a/compiler/testData/ir/irText/expressions/suspendConversionOnArbitraryExpression.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/suspendConversionOnArbitraryExpression.fir.ir.txt @@ -51,7 +51,7 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt VALUE_PARAMETER name:fn index:0 type:@[ExtensionFunctionType] kotlin.Function1 BLOCK_BODY CALL 'public final fun useSuspendExt (sfn: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1): kotlin.Unit declared in ' type=kotlin.Unit origin=null - sfn: BLOCK type=kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION + sfn: BLOCK type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> ($receiver:@[ExtensionFunctionType] kotlin.Function1, p0:kotlin.Int) returnType:kotlin.Unit [suspend] $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:@[ExtensionFunctionType] kotlin.Function1 VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:kotlin.Int @@ -59,7 +59,7 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null $this: GET_VAR 'callee: @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsExt.suspendConversion' type=@[ExtensionFunctionType] kotlin.Function1 origin=null p1: GET_VAR 'p0: kotlin.Int declared in .testExtAsExt.suspendConversion' type=kotlin.Int origin=null - FUNCTION_REFERENCE 'local final fun suspendConversion (p0: kotlin.Int): kotlin.Unit [suspend] declared in .testExtAsExt' type=kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION reflectionTarget=null + FUNCTION_REFERENCE 'local final fun suspendConversion (p0: kotlin.Int): kotlin.Unit [suspend] declared in .testExtAsExt' type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION reflectionTarget=null $receiver: GET_VAR 'fn: @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsExt' type=@[ExtensionFunctionType] kotlin.Function1 origin=null FUN name:testExtAsSimple visibility:public modality:FINAL <> (fn:@[ExtensionFunctionType] kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:fn index:0 type:@[ExtensionFunctionType] kotlin.Function1 @@ -79,7 +79,7 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt VALUE_PARAMETER name:fn index:0 type:kotlin.Function1 BLOCK_BODY CALL 'public final fun useSuspendExt (sfn: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1): kotlin.Unit declared in ' type=kotlin.Unit origin=null - sfn: BLOCK type=kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION + sfn: BLOCK type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> ($receiver:kotlin.Function1, p0:kotlin.Int) returnType:kotlin.Unit [suspend] $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function1 VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:kotlin.Int @@ -87,7 +87,7 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null $this: GET_VAR 'callee: kotlin.Function1 declared in .testSimpleAsExt.suspendConversion' type=kotlin.Function1 origin=null p1: GET_VAR 'p0: kotlin.Int declared in .testSimpleAsExt.suspendConversion' type=kotlin.Int origin=null - FUNCTION_REFERENCE 'local final fun suspendConversion (p0: kotlin.Int): kotlin.Unit [suspend] declared in .testSimpleAsExt' type=kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION reflectionTarget=null + FUNCTION_REFERENCE 'local final fun suspendConversion (p0: kotlin.Int): kotlin.Unit [suspend] declared in .testSimpleAsExt' type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1 origin=SUSPEND_CONVERSION reflectionTarget=null $receiver: GET_VAR 'fn: kotlin.Function1 declared in .testSimpleAsExt' type=kotlin.Function1 origin=null FUN name:testSimpleAsSimpleT visibility:public modality:FINAL <> (fn:kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:fn index:0 type:kotlin.Function1 @@ -109,7 +109,7 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt BLOCK_BODY CALL 'public final fun useSuspendExtT (sfn: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null : kotlin.Int - sfn: BLOCK type=kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION + sfn: BLOCK type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> ($receiver:kotlin.Function1, p0:T of .useSuspendExtT) returnType:kotlin.Unit [suspend] $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function1 VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:T of .useSuspendExtT @@ -117,7 +117,7 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null $this: GET_VAR 'callee: kotlin.Function1 declared in .testSimpleAsExtT.suspendConversion' type=kotlin.Function1 origin=null p1: GET_VAR 'p0: T of .useSuspendExtT declared in .testSimpleAsExtT.suspendConversion' type=T of .useSuspendExtT origin=null - FUNCTION_REFERENCE 'local final fun suspendConversion (p0: T of .useSuspendExtT): kotlin.Unit [suspend] declared in .testSimpleAsExtT' type=kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null + FUNCTION_REFERENCE 'local final fun suspendConversion (p0: T of .useSuspendExtT): kotlin.Unit [suspend] declared in .testSimpleAsExtT' type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null $receiver: GET_VAR 'fn: kotlin.Function1 declared in .testSimpleAsExtT' type=kotlin.Function1 origin=null FUN name:testExtAsSimpleT visibility:public modality:FINAL <> (fn:@[ExtensionFunctionType] kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:fn index:0 type:@[ExtensionFunctionType] kotlin.Function1 @@ -139,7 +139,7 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt BLOCK_BODY CALL 'public final fun useSuspendExtT (sfn: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null : kotlin.Int - sfn: BLOCK type=kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION + sfn: BLOCK type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> ($receiver:@[ExtensionFunctionType] kotlin.Function1, p0:T of .useSuspendExtT) returnType:kotlin.Unit [suspend] $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:@[ExtensionFunctionType] kotlin.Function1 VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:T of .useSuspendExtT @@ -147,7 +147,7 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null $this: GET_VAR 'callee: @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsExtT.suspendConversion' type=@[ExtensionFunctionType] kotlin.Function1 origin=null p1: GET_VAR 'p0: T of .useSuspendExtT declared in .testExtAsExtT.suspendConversion' type=T of .useSuspendExtT origin=null - FUNCTION_REFERENCE 'local final fun suspendConversion (p0: T of .useSuspendExtT): kotlin.Unit [suspend] declared in .testExtAsExtT' type=kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null + FUNCTION_REFERENCE 'local final fun suspendConversion (p0: T of .useSuspendExtT): kotlin.Unit [suspend] declared in .testExtAsExtT' type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null $receiver: GET_VAR 'fn: @[ExtensionFunctionType] kotlin.Function1 declared in .testExtAsExtT' type=@[ExtensionFunctionType] kotlin.Function1 origin=null FUN name:testSimpleSAsSimpleT visibility:public modality:FINAL (fn:kotlin.Function1.testSimpleSAsSimpleT, kotlin.Unit>) returnType:kotlin.Unit TYPE_PARAMETER name:S index:0 variance: superTypes:[kotlin.Any?] @@ -171,7 +171,7 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt BLOCK_BODY CALL 'public final fun useSuspendExtT (sfn: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null : S of .testSimpleSAsExtT - sfn: BLOCK type=kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION + sfn: BLOCK type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> ($receiver:kotlin.Function1.testSimpleSAsExtT, kotlin.Unit>, p0:T of .useSuspendExtT) returnType:kotlin.Unit [suspend] $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:kotlin.Function1.testSimpleSAsExtT, kotlin.Unit> VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:T of .useSuspendExtT @@ -179,7 +179,7 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null $this: GET_VAR 'callee: kotlin.Function1.testSimpleSAsExtT, kotlin.Unit> declared in .testSimpleSAsExtT.suspendConversion' type=kotlin.Function1.testSimpleSAsExtT, kotlin.Unit> origin=null p1: GET_VAR 'p0: T of .useSuspendExtT declared in .testSimpleSAsExtT.suspendConversion' type=T of .useSuspendExtT origin=null - FUNCTION_REFERENCE 'local final fun suspendConversion (p0: T of .useSuspendExtT): kotlin.Unit [suspend] declared in .testSimpleSAsExtT' type=kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null + FUNCTION_REFERENCE 'local final fun suspendConversion (p0: T of .useSuspendExtT): kotlin.Unit [suspend] declared in .testSimpleSAsExtT' type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null $receiver: GET_VAR 'fn: kotlin.Function1.testSimpleSAsExtT, kotlin.Unit> declared in .testSimpleSAsExtT' type=kotlin.Function1.testSimpleSAsExtT, kotlin.Unit> origin=null FUN name:testExtSAsSimpleT visibility:public modality:FINAL (fn:@[ExtensionFunctionType] kotlin.Function1.testExtSAsSimpleT, kotlin.Unit>) returnType:kotlin.Unit TYPE_PARAMETER name:S index:0 variance: superTypes:[kotlin.Any?] @@ -203,7 +203,7 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt BLOCK_BODY CALL 'public final fun useSuspendExtT (sfn: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null : S of .testExtSAsExtT - sfn: BLOCK type=kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION + sfn: BLOCK type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION FUN ADAPTER_FOR_SUSPEND_CONVERSION name:suspendConversion visibility:local modality:FINAL <> ($receiver:@[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit>, p0:T of .useSuspendExtT) returnType:kotlin.Unit [suspend] $receiver: VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:callee type:@[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit> VALUE_PARAMETER ADAPTER_PARAMETER_FOR_SUSPEND_CONVERSION name:p0 index:0 type:T of .useSuspendExtT @@ -211,7 +211,7 @@ FILE fqName: fileName:/suspendConversionOnArbitraryExpression.kt CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null $this: GET_VAR 'callee: @[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit> declared in .testExtSAsExtT.suspendConversion' type=@[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit> origin=null p1: GET_VAR 'p0: T of .useSuspendExtT declared in .testExtSAsExtT.suspendConversion' type=T of .useSuspendExtT origin=null - FUNCTION_REFERENCE 'local final fun suspendConversion (p0: T of .useSuspendExtT): kotlin.Unit [suspend] declared in .testExtSAsExtT' type=kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null + FUNCTION_REFERENCE 'local final fun suspendConversion (p0: T of .useSuspendExtT): kotlin.Unit [suspend] declared in .testExtSAsExtT' type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1.useSuspendExtT, kotlin.Unit> origin=SUSPEND_CONVERSION reflectionTarget=null $receiver: GET_VAR 'fn: @[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit> declared in .testExtSAsExtT' type=@[ExtensionFunctionType] kotlin.Function1.testExtSAsExtT, kotlin.Unit> origin=null FUN name:testSmartCastWithSuspendConversion visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Any diff --git a/compiler/testData/ir/irText/firProblems/AllCandidates.fir.ir.txt b/compiler/testData/ir/irText/firProblems/AllCandidates.fir.ir.txt index 765733157d8..03b05f9c8e0 100644 --- a/compiler/testData/ir/irText/firProblems/AllCandidates.fir.ir.txt +++ b/compiler/testData/ir/irText/firProblems/AllCandidates.fir.ir.txt @@ -59,7 +59,7 @@ FILE fqName: fileName:/AllCandidates.kt : @[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?>? $receiver: CALL 'public open fun nameNotFound (): @[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] R of .OverloadResolutionResultsImpl.nameNotFound?>? declared in .OverloadResolutionResultsImpl' type=@[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?>? origin=null : @[FlexibleNullability] A of .allCandidatesResult? - block: FUN_EXPR type=kotlin.Function1<@[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?>?, kotlin.Unit> origin=LAMBDA + block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<@[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?>?, kotlin.Unit> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:@[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?>?) returnType:kotlin.Unit $receiver: VALUE_PARAMETER name:$this$apply type:@[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?>? BLOCK_BODY diff --git a/compiler/testData/ir/irText/firProblems/typeVariableAfterBuildMap.fir.ir.txt b/compiler/testData/ir/irText/firProblems/typeVariableAfterBuildMap.fir.ir.txt index 2f960d9f8bd..b4f187fe017 100644 --- a/compiler/testData/ir/irText/firProblems/typeVariableAfterBuildMap.fir.ir.txt +++ b/compiler/testData/ir/irText/firProblems/typeVariableAfterBuildMap.fir.ir.txt @@ -620,7 +620,7 @@ FILE fqName: fileName:/typeVariableAfterBuildMap.kt CALL 'public final fun buildMap (builderAction: @[ExtensionFunctionType] kotlin.Function1, kotlin.Unit>): kotlin.collections.Map [inline] declared in kotlin.collections.MapsKt' type=kotlin.collections.Map<.Visibility, kotlin.Int> origin=null : .Visibility : kotlin.Int - builderAction: FUN_EXPR type=kotlin.Function1.Visibility, kotlin.Int>, kotlin.Unit> origin=LAMBDA + builderAction: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1.Visibility, kotlin.Int>, kotlin.Unit> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:kotlin.collections.MutableMap<.Visibility, kotlin.Int>) returnType:kotlin.Unit $receiver: VALUE_PARAMETER name:$this$buildMap type:kotlin.collections.MutableMap<.Visibility, kotlin.Int> BLOCK_BODY diff --git a/compiler/testData/ir/irText/lambdas/extensionLambda.fir.ir.txt b/compiler/testData/ir/irText/lambdas/extensionLambda.fir.ir.txt deleted file mode 100644 index 45026b02efd..00000000000 --- a/compiler/testData/ir/irText/lambdas/extensionLambda.fir.ir.txt +++ /dev/null @@ -1,15 +0,0 @@ -FILE fqName: fileName:/extensionLambda.kt - FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Int - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test1 (): kotlin.Int declared in ' - CALL 'public final fun run (block: @[ExtensionFunctionType] kotlin.Function1): R of kotlin.StandardKt.run [inline] declared in kotlin.StandardKt' type=kotlin.Int origin=null - : kotlin.String - : kotlin.Int - $receiver: CONST String type=kotlin.String value="42" - block: FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:kotlin.String) returnType:kotlin.Int - $receiver: VALUE_PARAMETER name:$this$run type:kotlin.String - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (): kotlin.Int declared in .test1' - CALL 'public open fun (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY - $this: GET_VAR '$this$run: kotlin.String declared in .test1.' type=kotlin.String origin=null diff --git a/compiler/testData/ir/irText/lambdas/extensionLambda.fir.kt.txt b/compiler/testData/ir/irText/lambdas/extensionLambda.fir.kt.txt deleted file mode 100644 index b353ca3f2b1..00000000000 --- a/compiler/testData/ir/irText/lambdas/extensionLambda.fir.kt.txt +++ /dev/null @@ -1,7 +0,0 @@ -fun test1(): Int { - return "42".run(block = local fun String.(): Int { - return $this$run.() - } -) -} - diff --git a/compiler/testData/ir/irText/lambdas/extensionLambda.kt b/compiler/testData/ir/irText/lambdas/extensionLambda.kt index 2c3825f12a3..724fb7da3f9 100644 --- a/compiler/testData/ir/irText/lambdas/extensionLambda.kt +++ b/compiler/testData/ir/irText/lambdas/extensionLambda.kt @@ -1 +1,2 @@ +// FIR_IDENTICAL fun test1() = "42".run { length } \ No newline at end of file diff --git a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.fir.ir.txt b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.fir.ir.txt index 1a04f896442..039b9225eba 100644 --- a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.fir.ir.txt +++ b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.fir.ir.txt @@ -90,7 +90,7 @@ FILE fqName: fileName:/multipleImplicitReceivers.kt : .A : kotlin.Int receiver: GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.A - block: FUN_EXPR type=kotlin.Function1<.A, kotlin.Int> origin=LAMBDA + block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<.A, kotlin.Int> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.A) returnType:kotlin.Int $receiver: VALUE_PARAMETER name:$this$with type:.A BLOCK_BODY @@ -99,7 +99,7 @@ FILE fqName: fileName:/multipleImplicitReceivers.kt : .IFoo : kotlin.Int receiver: GET_VAR 'fooImpl: .IFoo declared in .test' type=.IFoo origin=null - block: FUN_EXPR type=kotlin.Function1<.IFoo, kotlin.Int> origin=LAMBDA + block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<.IFoo, kotlin.Int> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.IFoo) returnType:kotlin.Int $receiver: VALUE_PARAMETER name:$this$with type:.IFoo BLOCK_BODY @@ -108,7 +108,7 @@ FILE fqName: fileName:/multipleImplicitReceivers.kt : .IInvoke : kotlin.Int receiver: GET_VAR 'invokeImpl: .IInvoke declared in .test' type=.IInvoke origin=null - block: FUN_EXPR type=kotlin.Function1<.IInvoke, kotlin.Int> origin=LAMBDA + block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<.IInvoke, kotlin.Int> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.IInvoke) returnType:kotlin.Int $receiver: VALUE_PARAMETER name:$this$with type:.IInvoke BLOCK_BODY diff --git a/compiler/testData/ir/irText/stubs/builtinMap.fir.ir.txt b/compiler/testData/ir/irText/stubs/builtinMap.fir.ir.txt index d54490ee6a5..de4ffec1de4 100644 --- a/compiler/testData/ir/irText/stubs/builtinMap.fir.ir.txt +++ b/compiler/testData/ir/irText/stubs/builtinMap.fir.ir.txt @@ -22,7 +22,7 @@ FILE fqName: fileName:/builtinMap.kt : @[FlexibleNullability] K1 of .plus? : @[FlexibleNullability] V1 of .plus? p0: GET_VAR ': kotlin.collections.Map.plus, V1 of .plus> declared in .plus' type=kotlin.collections.Map.plus, V1 of .plus> origin=null - block: FUN_EXPR type=kotlin.Function1.plus?, @[FlexibleNullability] V1 of .plus?>, kotlin.Unit> origin=LAMBDA + block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1.plus?, @[FlexibleNullability] V1 of .plus?>, kotlin.Unit> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:java.util.LinkedHashMap<@[FlexibleNullability] K1 of .plus?, @[FlexibleNullability] V1 of .plus?>) returnType:kotlin.Unit $receiver: VALUE_PARAMETER name:$this$apply type:java.util.LinkedHashMap<@[FlexibleNullability] K1 of .plus?, @[FlexibleNullability] V1 of .plus?> BLOCK_BODY diff --git a/compiler/testData/ir/irText/types/castsInsideCoroutineInference.fir.ir.txt b/compiler/testData/ir/irText/types/castsInsideCoroutineInference.fir.ir.txt index a743ccd9e03..601ca02ad03 100644 --- a/compiler/testData/ir/irText/types/castsInsideCoroutineInference.fir.ir.txt +++ b/compiler/testData/ir/irText/types/castsInsideCoroutineInference.fir.ir.txt @@ -10,7 +10,7 @@ FILE fqName: fileName:/castsInsideCoroutineInference.kt RETURN type=kotlin.Nothing from='public final fun scopedFlow (block: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction2<.CoroutineScope, .FlowCollector.scopedFlow>, kotlin.Unit>): .Flow.scopedFlow> declared in ' CALL 'public final fun flow (block: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<.FlowCollector.flow>, kotlin.Unit>): .Flow.flow> declared in ' type=.Flow.scopedFlow> origin=null : R of .scopedFlow - block: FUN_EXPR type=kotlin.coroutines.SuspendFunction1<.FlowCollector.scopedFlow>, kotlin.Unit> origin=LAMBDA + block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<.FlowCollector.scopedFlow>, kotlin.Unit> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.FlowCollector.scopedFlow>) returnType:kotlin.Unit [suspend] $receiver: VALUE_PARAMETER name:$this$flow type:.FlowCollector.scopedFlow> BLOCK_BODY @@ -18,7 +18,7 @@ FILE fqName: fileName:/castsInsideCoroutineInference.kt GET_VAR '$this$flow: .FlowCollector.scopedFlow> declared in .scopedFlow.' type=.FlowCollector.scopedFlow> origin=null CALL 'public final fun flowScope (block: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<.CoroutineScope, R of .flowScope>): R of .flowScope [suspend] declared in ' type=kotlin.Unit origin=null : kotlin.Unit - block: FUN_EXPR type=kotlin.coroutines.SuspendFunction1<.CoroutineScope, kotlin.Unit> origin=LAMBDA + block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<.CoroutineScope, kotlin.Unit> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.CoroutineScope) returnType:kotlin.Unit [suspend] $receiver: VALUE_PARAMETER name:$this$flowScope type:.CoroutineScope BLOCK_BODY @@ -34,7 +34,7 @@ FILE fqName: fileName:/castsInsideCoroutineInference.kt RETURN type=kotlin.Nothing from='public final fun onCompletion (action: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction2<.FlowCollector.onCompletion>, @[ParameterName(name = 'cause')] kotlin.Throwable?, kotlin.Unit>): .Flow.onCompletion> declared in ' CALL 'public final fun unsafeFlow (block: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<.FlowCollector.unsafeFlow>, kotlin.Unit>): .Flow.unsafeFlow> [inline] declared in ' type=.Flow.onCompletion> origin=null : T of .onCompletion - block: FUN_EXPR type=kotlin.coroutines.SuspendFunction1<.FlowCollector.onCompletion>, kotlin.Unit> origin=LAMBDA + block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<.FlowCollector.onCompletion>, kotlin.Unit> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.FlowCollector.onCompletion>) returnType:kotlin.Unit [suspend] $receiver: VALUE_PARAMETER name:$this$unsafeFlow type:.FlowCollector.onCompletion> BLOCK_BODY @@ -72,7 +72,7 @@ FILE fqName: fileName:/castsInsideCoroutineInference.kt CALL 'public final fun onCompletion (action: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction2<.FlowCollector.onCompletion>, @[ParameterName(name = 'cause')] kotlin.Throwable?, kotlin.Unit>): .Flow.onCompletion> declared in ' type=.Flow.onCompletion> origin=null : T of .onCompletion $receiver: GET_VAR ': .Flow.onCompletion> declared in .onCompletion' type=.Flow.onCompletion> origin=null - action: FUN_EXPR type=kotlin.coroutines.SuspendFunction2<.FlowCollector.onCompletion>, @[ParameterName(name = 'cause')] kotlin.Throwable?, kotlin.Unit> origin=LAMBDA + action: FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction2<.FlowCollector.onCompletion>, @[ParameterName(name = 'cause')] kotlin.Throwable?, kotlin.Unit> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.FlowCollector.onCompletion>, it:@[ParameterName(name = 'cause')] kotlin.Throwable?) returnType:kotlin.Unit [suspend] $receiver: VALUE_PARAMETER name:$this$onCompletion type:.FlowCollector.onCompletion> VALUE_PARAMETER name:it index:0 type:@[ParameterName(name = 'cause')] kotlin.Throwable? @@ -88,7 +88,7 @@ FILE fqName: fileName:/castsInsideCoroutineInference.kt CALL 'public final fun produce (block: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<.ProducerScope.produce>, kotlin.Unit>): .ReceiveChannel.produce> declared in ' type=.ReceiveChannel origin=null : kotlin.Any $receiver: GET_VAR ': .CoroutineScope declared in .asFairChannel' type=.CoroutineScope origin=null - block: FUN_EXPR type=kotlin.coroutines.SuspendFunction1<.ProducerScope, kotlin.Unit> origin=LAMBDA + block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<.ProducerScope, kotlin.Unit> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.ProducerScope) returnType:kotlin.Unit [suspend] $receiver: VALUE_PARAMETER name:$this$produce type:.ProducerScope BLOCK_BODY @@ -126,7 +126,7 @@ FILE fqName: fileName:/castsInsideCoroutineInference.kt CALL 'public final fun produce (block: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<.ProducerScope.produce>, kotlin.Unit>): .ReceiveChannel.produce> declared in ' type=.ReceiveChannel<@[ParameterName(name = 'value')] kotlin.Any> origin=null : @[ParameterName(name = 'value')] kotlin.Any $receiver: GET_VAR ': .CoroutineScope declared in .asChannel' type=.CoroutineScope origin=null - block: FUN_EXPR type=kotlin.coroutines.SuspendFunction1<.ProducerScope<@[ParameterName(name = 'value')] kotlin.Any>, kotlin.Unit> origin=LAMBDA + block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<.ProducerScope<@[ParameterName(name = 'value')] kotlin.Any>, kotlin.Unit> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.ProducerScope<@[ParameterName(name = 'value')] kotlin.Any>) returnType:kotlin.Unit [suspend] $receiver: VALUE_PARAMETER name:$this$produce type:.ProducerScope<@[ParameterName(name = 'value')] kotlin.Any> BLOCK_BODY