diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/builders/ExpressionHelpers.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/builders/ExpressionHelpers.kt index 2a0a01853ef..bcf09be70b7 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/builders/ExpressionHelpers.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/builders/ExpressionHelpers.kt @@ -126,6 +126,3 @@ fun IrBuilderWithScope.irString(value: String) = fun IrBuilderWithScope.irConcat() = IrStringConcatenationImpl(startOffset, endOffset, context.builtIns.stringType) - -fun IrBuilderWithScope.irCallableReference(type: KotlinType, descriptor: CallableDescriptor) = - IrCallableReferenceImpl(startOffset, endOffset, type, descriptor) \ No newline at end of file diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/BodyGenerator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/BodyGenerator.kt index bb705223901..788afd44691 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/BodyGenerator.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/BodyGenerator.kt @@ -19,18 +19,12 @@ package org.jetbrains.kotlin.psi2ir.generators import org.jetbrains.kotlin.builtins.KotlinBuiltIns import org.jetbrains.kotlin.descriptors.* import org.jetbrains.kotlin.ir.declarations.IrFunctionBase -import org.jetbrains.kotlin.ir.descriptors.IrPropertyDelegateDescriptor import org.jetbrains.kotlin.ir.expressions.* import org.jetbrains.kotlin.psi.* import org.jetbrains.kotlin.psi.psiUtil.endOffset import org.jetbrains.kotlin.psi.psiUtil.startOffset -import org.jetbrains.kotlin.psi2ir.builders.irBlockBody -import org.jetbrains.kotlin.psi2ir.builders.irCallableReference -import org.jetbrains.kotlin.psi2ir.builders.irGet -import org.jetbrains.kotlin.psi2ir.builders.irReturn -import org.jetbrains.kotlin.psi2ir.intermediate.VariableLValue -import org.jetbrains.kotlin.psi2ir.intermediate.setExplicitReceiverValue import org.jetbrains.kotlin.resolve.BindingContext +import java.lang.AssertionError import java.util.* class BodyGenerator(val scopeOwner: DeclarationDescriptor, override val context: GeneratorContext): GeneratorWithScope { diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/DelegatedPropertyGenerator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/DelegatedPropertyGenerator.kt index abe9abc3344..917aa77f159 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/DelegatedPropertyGenerator.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/DelegatedPropertyGenerator.kt @@ -86,7 +86,8 @@ class DelegatedPropertyGenerator(override val context: GeneratorContext) : Gener BackingFieldLValue(ktDelegate.startOffset, ktDelegate.endOffset, delegateDescriptor, null) private fun createCallableReference(ktElement: KtElement, type: KotlinType, referencedDescriptor: CallableDescriptor): IrCallableReference = - IrCallableReferenceImpl(ktElement.startOffset, ktElement.endOffset, type, referencedDescriptor) + IrCallableReferenceImpl(ktElement.startOffset, ktElement.endOffset, type, + referencedDescriptor, IrOperator.PROPERTY_REFERENCE_FOR_DELEGATE) fun generateLocalDelegatedProperty( ktProperty: KtProperty, diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/LocalFunctionGenerator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/LocalFunctionGenerator.kt index c1635929ccc..5c7dbc49389 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/LocalFunctionGenerator.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/LocalFunctionGenerator.kt @@ -40,7 +40,8 @@ class LocalFunctionGenerator(statementGenerator: StatementGenerator) : Statement irFun.body = BodyGenerator(lambdaDescriptor, statementGenerator.context).generateLambdaBody(ktFun) irBlock.addStatement(irFun) - irBlock.addStatement(IrCallableReferenceImpl(ktLambda.startOffset, ktLambda.endOffset, lambdaExpressionType, lambdaDescriptor)) + irBlock.addStatement(IrCallableReferenceImpl(ktLambda.startOffset, ktLambda.endOffset, lambdaExpressionType, + lambdaDescriptor, IrOperator.LAMBDA)) return irBlock } @@ -57,7 +58,8 @@ class LocalFunctionGenerator(statementGenerator: StatementGenerator) : Statement val irFun = generateFunctionDeclaration(ktFun) irBlock.addStatement(irFun) - irBlock.addStatement(IrCallableReferenceImpl(ktFun.startOffset, ktFun.endOffset, funExpressionType, irFun.descriptor)) + irBlock.addStatement(IrCallableReferenceImpl(ktFun.startOffset, ktFun.endOffset, funExpressionType, + irFun.descriptor, IrOperator.ANONYMOUS_FUNCTION)) irBlock } diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/IrCallableReference.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/IrCallableReference.kt index 7ed5e257425..4b372a0f8d5 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/IrCallableReference.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/IrCallableReference.kt @@ -17,37 +17,19 @@ package org.jetbrains.kotlin.ir.expressions import org.jetbrains.kotlin.descriptors.CallableDescriptor -import org.jetbrains.kotlin.ir.IrElement import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.types.KotlinType - -interface IrCallableReference : IrDeclarationReference { - override val descriptor: CallableDescriptor - - // TODO closure -} +interface IrCallableReference : IrGeneralCall class IrCallableReferenceImpl( startOffset: Int, endOffset: Int, type: KotlinType, - descriptor: CallableDescriptor -) : IrDeclarationReferenceBase(startOffset, endOffset, type, descriptor), IrCallableReference { + override val descriptor: CallableDescriptor, + override val operator: IrOperator? = null +) : IrGeneralCallBase(startOffset, endOffset, type, descriptor.valueParameters.size, operator), IrCallableReference { override fun accept(visitor: IrElementVisitor, data: D): R { return visitor.visitCallableReference(this, data) } - - override fun acceptChildren(visitor: IrElementVisitor, data: D) { - // TODO - } - - override fun getChild(slot: Int): IrElement? { - // TODO - return null - } - - override fun replaceChild(slot: Int, newChild: IrElement) { - // TODO - } } \ No newline at end of file diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/IrOperator.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/IrOperator.kt index 234273ceb63..ee6f8df736c 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/IrOperator.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/IrOperator.kt @@ -91,7 +91,8 @@ interface IrOperator { object SUPER_CONSTRUCTOR_CALL : IrOperatorImpl("SUPER_CONSTRUCTOR_CALL") object INITIALIZE_PROPERTY_FROM_PARAMETER : IrOperatorImpl("INITIALIZE_PROPERTY_FROM_PARAMETER") - object ANONYMOUS_INITIALIZER : IrOperatorImpl("ANONYMOUS_INITIALIZER") + + object PROPERTY_REFERENCE_FOR_DELEGATE : IrOperatorImpl("PROPERTY_REFERENCE_FOR_DELEGATE") data class COMPONENT_N private constructor(val index: Int) : IrOperatorImpl("COMPONENT_$index") { companion object { diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/RenderIrElement.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/RenderIrElement.kt index 8312ac77283..ed4e46ad67e 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/RenderIrElement.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/RenderIrElement.kt @@ -171,10 +171,10 @@ class RenderIrElementVisitor : IrElementVisitor { "THROW type=${expression.type.render()}" override fun visitCallableReference(expression: IrCallableReference, data: Nothing?): String = - "CALLABLE_REFERENCE ${expression.descriptor.render()} type=${expression.type.render()}" + "CALLABLE_REFERENCE ${expression.descriptor.name} type=${expression.type.render()} operator=${expression.operator}" override fun visitClassReference(expression: IrClassReference, data: Nothing?): String = - "CLASS_REFERENCE ${expression.descriptor.render()} type=${expression.type.render()}" + "CLASS_REFERENCE ${expression.descriptor.name} type=${expression.type.render()}" override fun visitGetClass(expression: IrGetClass, data: Nothing?): String = "GET_CLASS type=${expression.type.render()}" diff --git a/compiler/testData/ir/irText/declarations/delegatedProperties.txt b/compiler/testData/ir/irText/declarations/delegatedProperties.txt index 15fd9a2372c..c9ce5687239 100644 --- a/compiler/testData/ir/irText/declarations/delegatedProperties.txt +++ b/compiler/testData/ir/irText/declarations/delegatedProperties.txt @@ -8,14 +8,14 @@ FILE /delegatedProperties.kt BLOCK_BODY RETURN type=kotlin.Nothing from= CONST Int type=kotlin.Int value='42' - CALLABLE_REFERENCE local final fun (): kotlin.Int type=() -> kotlin.Int + CALLABLE_REFERENCE type=() -> kotlin.Int operator=LAMBDA PROPERTY_GETTER public fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from= CALL .getValue type=kotlin.Int operator=null $receiver: GET_BACKING_FIELD test1$delegate type=kotlin.Lazy operator=null thisRef: CONST Null type=kotlin.Nothing? value='null' - property: CALLABLE_REFERENCE public val test1: kotlin.Int type=kotlin.reflect.KProperty0 + property: CALLABLE_REFERENCE test1 type=kotlin.reflect.KProperty0 operator=PROPERTY_REFERENCE_FOR_DELEGATE CLASS CLASS C CONSTRUCTOR public constructor C(/*0*/ map: kotlin.collections.MutableMap) BLOCK_BODY @@ -34,14 +34,14 @@ FILE /delegatedProperties.kt BLOCK_BODY RETURN type=kotlin.Nothing from= CONST Int type=kotlin.Int value='42' - CALLABLE_REFERENCE local final fun (): kotlin.Int type=() -> kotlin.Int + CALLABLE_REFERENCE type=() -> kotlin.Int operator=LAMBDA PROPERTY_GETTER public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from= CALL .getValue type=kotlin.Int operator=null $receiver: GET_BACKING_FIELD test2$delegate type=kotlin.Lazy operator=null thisRef: THIS public final class C type=C - property: CALLABLE_REFERENCE public final val test2: kotlin.Int type=kotlin.reflect.KProperty1 + property: CALLABLE_REFERENCE test2 type=kotlin.reflect.KProperty1 operator=PROPERTY_REFERENCE_FOR_DELEGATE PROPERTY public final var test3: kotlin.Any delegate: PROPERTY val `test3$delegate`: kotlin.collections.MutableMap EXPRESSION_BODY @@ -53,14 +53,14 @@ FILE /delegatedProperties.kt CALL .getValue type=kotlin.Any operator=null $receiver: GET_BACKING_FIELD test3$delegate type=kotlin.collections.MutableMap operator=null thisRef: THIS public final class C type=C - property: CALLABLE_REFERENCE public final var test3: kotlin.Any type=kotlin.reflect.KMutableProperty1 + property: CALLABLE_REFERENCE test3 type=kotlin.reflect.KMutableProperty1 operator=PROPERTY_REFERENCE_FOR_DELEGATE PROPERTY_SETTER public final fun (/*0*/ : kotlin.Any): kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from= CALL .setValue type=kotlin.Unit operator=null $receiver: GET_BACKING_FIELD test3$delegate type=kotlin.collections.MutableMap operator=null thisRef: THIS public final class C type=C - property: CALLABLE_REFERENCE public final var test3: kotlin.Any type=kotlin.reflect.KMutableProperty1 + property: CALLABLE_REFERENCE test3 type=kotlin.reflect.KMutableProperty1 operator=PROPERTY_REFERENCE_FOR_DELEGATE value: GET_VAR type=kotlin.Any operator=null PROPERTY public var test4: kotlin.Any delegate: PROPERTY val `test4$delegate`: java.util.HashMap @@ -72,12 +72,12 @@ FILE /delegatedProperties.kt CALL .getValue type=kotlin.Any operator=null $receiver: GET_BACKING_FIELD test4$delegate type=java.util.HashMap operator=null thisRef: CONST Null type=kotlin.Nothing? value='null' - property: CALLABLE_REFERENCE public var test4: kotlin.Any type=kotlin.reflect.KMutableProperty0 + property: CALLABLE_REFERENCE test4 type=kotlin.reflect.KMutableProperty0 operator=PROPERTY_REFERENCE_FOR_DELEGATE PROPERTY_SETTER public fun (/*0*/ : kotlin.Any): kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from= CALL .setValue type=kotlin.Unit operator=null $receiver: GET_BACKING_FIELD test4$delegate type=java.util.HashMap operator=null thisRef: CONST Null type=kotlin.Nothing? value='null' - property: CALLABLE_REFERENCE public var test4: kotlin.Any type=kotlin.reflect.KMutableProperty0 + property: CALLABLE_REFERENCE test4 type=kotlin.reflect.KMutableProperty0 operator=PROPERTY_REFERENCE_FOR_DELEGATE value: GET_VAR type=kotlin.Any operator=null diff --git a/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt b/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt index abbd60cb91e..1bea713eace 100644 --- a/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt +++ b/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt @@ -9,14 +9,14 @@ FILE /localDelegatedProperties.kt BLOCK_BODY RETURN type=kotlin.Nothing from= CONST Int type=kotlin.Int value='42' - CALLABLE_REFERENCE local final fun (): kotlin.Int type=() -> kotlin.Int + CALLABLE_REFERENCE type=() -> kotlin.Int operator=LAMBDA LOCAL_PROPERTY_ACCESSOR BLOCK_BODY RETURN type=kotlin.Nothing from= CALL .getValue type=kotlin.Int operator=null $receiver: GET_VAR x$delegate type=kotlin.Lazy operator=null thisRef: CONST Null type=kotlin.Nothing? value='null' - property: CALLABLE_REFERENCE val x: kotlin.Int type=kotlin.reflect.KProperty0 + property: CALLABLE_REFERENCE x type=kotlin.reflect.KProperty0 operator=PROPERTY_REFERENCE_FOR_DELEGATE CALL .println type=kotlin.Unit operator=null message: CALL . type=kotlin.Int operator=GET_LOCAL_PROPERTY FUN public fun test2(): kotlin.Unit @@ -30,7 +30,7 @@ FILE /localDelegatedProperties.kt CALL .getValue type=kotlin.Int operator=null $receiver: GET_VAR x$delegate type=java.util.HashMap operator=null thisRef: CONST Null type=kotlin.Nothing? value='null' - property: CALLABLE_REFERENCE var x: kotlin.Int type=kotlin.reflect.KMutableProperty0 + property: CALLABLE_REFERENCE x type=kotlin.reflect.KMutableProperty0 operator=PROPERTY_REFERENCE_FOR_DELEGATE LOCAL_PROPERTY_ACCESSOR BLOCK_BODY RETURN type=kotlin.Nothing from= @@ -38,7 +38,7 @@ FILE /localDelegatedProperties.kt CALL .setValue type=kotlin.Unit operator=null $receiver: GET_VAR x$delegate type=java.util.HashMap operator=null thisRef: CONST Null type=kotlin.Nothing? value='null' - property: CALLABLE_REFERENCE var x: kotlin.Int type=kotlin.reflect.KMutableProperty0 + property: CALLABLE_REFERENCE x type=kotlin.reflect.KMutableProperty0 operator=PROPERTY_REFERENCE_FOR_DELEGATE value: GET_VAR value type=kotlin.Int operator=null CALL . type=kotlin.Int operator=EQ value: CONST Int type=kotlin.Int value='0' diff --git a/compiler/testData/ir/irText/expressions/reflectionLiterals.txt b/compiler/testData/ir/irText/expressions/reflectionLiterals.txt index 81ddd92275d..96712547df5 100644 --- a/compiler/testData/ir/irText/expressions/reflectionLiterals.txt +++ b/compiler/testData/ir/irText/expressions/reflectionLiterals.txt @@ -12,23 +12,23 @@ FILE /reflectionLiterals.kt CONST Int type=kotlin.Int value='42' PROPERTY public val test1: kotlin.reflect.KClass EXPRESSION_BODY - CLASS_REFERENCE public final class A type=kotlin.reflect.KClass + CLASS_REFERENCE A type=kotlin.reflect.KClass PROPERTY public val test2: kotlin.reflect.KClass EXPRESSION_BODY GET_CLASS type=kotlin.reflect.KClass CALL . type=kotlin.Int operator=GET_PROPERTY PROPERTY public val test3: kotlin.reflect.KFunction1 EXPRESSION_BODY - CALLABLE_REFERENCE public final fun foo(): kotlin.Unit type=kotlin.reflect.KFunction1 + CALLABLE_REFERENCE foo type=kotlin.reflect.KFunction1 operator=null PROPERTY public val test4: kotlin.reflect.KFunction0 EXPRESSION_BODY - CALLABLE_REFERENCE public constructor A() type=kotlin.reflect.KFunction0 + CALLABLE_REFERENCE type=kotlin.reflect.KFunction0 operator=null PROPERTY public val test5: kotlin.reflect.KFunction0 EXPRESSION_BODY - CALLABLE_REFERENCE public final fun foo(): kotlin.Unit type=kotlin.reflect.KFunction0 + CALLABLE_REFERENCE foo type=kotlin.reflect.KFunction0 operator=null PROPERTY public val test6: kotlin.reflect.KFunction0 EXPRESSION_BODY - CALLABLE_REFERENCE public fun bar(): kotlin.Unit type=kotlin.reflect.KFunction0 + CALLABLE_REFERENCE bar type=kotlin.reflect.KFunction0 operator=null PROPERTY public val test7: kotlin.reflect.KProperty0 EXPRESSION_BODY - CALLABLE_REFERENCE public val qux: kotlin.Int = 42 type=kotlin.reflect.KProperty0 + CALLABLE_REFERENCE qux type=kotlin.reflect.KProperty0 operator=null diff --git a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt index 2a29933efd7..644a78b5113 100644 --- a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt +++ b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt @@ -7,7 +7,7 @@ FILE /variableAsFunctionCall.kt BLOCK_BODY RETURN type=kotlin.Nothing from= $RECEIVER of: k type=kotlin.String - CALLABLE_REFERENCE local final fun (): kotlin.String type=() -> kotlin.String + CALLABLE_REFERENCE type=() -> kotlin.String operator=LAMBDA FUN public fun test1(/*0*/ f: () -> kotlin.Unit): kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from=test1 diff --git a/compiler/testData/ir/irText/lambdas/anonymousFunction.txt b/compiler/testData/ir/irText/lambdas/anonymousFunction.txt index 46889b98101..847308aecf7 100644 --- a/compiler/testData/ir/irText/lambdas/anonymousFunction.txt +++ b/compiler/testData/ir/irText/lambdas/anonymousFunction.txt @@ -5,4 +5,4 @@ FILE /anonymousFunction.kt FUN local final fun (): kotlin.Unit BLOCK_BODY CALL .println type=kotlin.Unit operator=null - CALLABLE_REFERENCE local final fun (): kotlin.Unit type=() -> kotlin.Unit + CALLABLE_REFERENCE type=() -> kotlin.Unit operator=ANONYMOUS_FUNCTION diff --git a/compiler/testData/ir/irText/lambdas/extensionLambda.txt b/compiler/testData/ir/irText/lambdas/extensionLambda.txt index 12970a641a9..00e7bccaecc 100644 --- a/compiler/testData/ir/irText/lambdas/extensionLambda.txt +++ b/compiler/testData/ir/irText/lambdas/extensionLambda.txt @@ -10,4 +10,4 @@ FILE /extensionLambda.kt RETURN type=kotlin.Nothing from= CALL . type=kotlin.Int operator=GET_PROPERTY $this: $RECEIVER of: type=kotlin.String - CALLABLE_REFERENCE local final fun kotlin.String.(): kotlin.Int type=kotlin.String.() -> kotlin.Int + CALLABLE_REFERENCE type=kotlin.String.() -> kotlin.Int operator=LAMBDA diff --git a/compiler/testData/ir/irText/lambdas/justLambda.txt b/compiler/testData/ir/irText/lambdas/justLambda.txt index 5dd9772288c..1d7b4c1b1f3 100644 --- a/compiler/testData/ir/irText/lambdas/justLambda.txt +++ b/compiler/testData/ir/irText/lambdas/justLambda.txt @@ -6,4 +6,4 @@ FILE /justLambda.kt BLOCK_BODY RETURN type=kotlin.Nothing from= CONST Int type=kotlin.Int value='42' - CALLABLE_REFERENCE local final fun (): kotlin.Int type=() -> kotlin.Int + CALLABLE_REFERENCE type=() -> kotlin.Int operator=LAMBDA diff --git a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt index 55bff8463a6..ea91e24dcc9 100644 --- a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt +++ b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt @@ -43,6 +43,6 @@ FILE /multipleImplicitReceivers.kt $receiver: CALL . type=B operator=GET_PROPERTY $this: $RECEIVER of: type=IFoo $receiver: $RECEIVER of: type=A - CALLABLE_REFERENCE local final fun IInvoke.(): kotlin.Int type=IInvoke.() -> kotlin.Int - CALLABLE_REFERENCE local final fun IFoo.(): kotlin.Int type=IFoo.() -> kotlin.Int - CALLABLE_REFERENCE local final fun A.(): kotlin.Int type=A.() -> kotlin.Int + CALLABLE_REFERENCE type=IInvoke.() -> kotlin.Int operator=LAMBDA + CALLABLE_REFERENCE type=IFoo.() -> kotlin.Int operator=LAMBDA + CALLABLE_REFERENCE type=A.() -> kotlin.Int operator=LAMBDA diff --git a/compiler/testData/ir/irText/lambdas/nonLocalReturn.txt b/compiler/testData/ir/irText/lambdas/nonLocalReturn.txt index 2c599f8c0d4..e34370119fe 100644 --- a/compiler/testData/ir/irText/lambdas/nonLocalReturn.txt +++ b/compiler/testData/ir/irText/lambdas/nonLocalReturn.txt @@ -6,7 +6,7 @@ FILE /nonLocalReturn.kt FUN local final fun (): kotlin.Nothing BLOCK_BODY RETURN type=kotlin.Nothing from=test0 - CALLABLE_REFERENCE local final fun (): kotlin.Nothing type=() -> kotlin.Nothing + CALLABLE_REFERENCE type=() -> kotlin.Nothing operator=LAMBDA FUN public fun test1(): kotlin.Unit BLOCK_BODY CALL .run type=kotlin.Unit operator=null @@ -14,7 +14,7 @@ FILE /nonLocalReturn.kt FUN local final fun (): kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from= - CALLABLE_REFERENCE local final fun (): kotlin.Unit type=() -> kotlin.Unit + CALLABLE_REFERENCE type=() -> kotlin.Unit operator=LAMBDA FUN public fun test2(): kotlin.Unit BLOCK_BODY CALL .run type=kotlin.Unit operator=null @@ -22,7 +22,7 @@ FILE /nonLocalReturn.kt FUN local final fun (): kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from= - CALLABLE_REFERENCE local final fun (): kotlin.Unit type=() -> kotlin.Unit + CALLABLE_REFERENCE type=() -> kotlin.Unit operator=LAMBDA FUN public fun testLrmFoo1(/*0*/ ints: kotlin.collections.List): kotlin.Unit BLOCK_BODY CALL .forEach type=kotlin.Unit operator=null @@ -38,7 +38,7 @@ FILE /nonLocalReturn.kt RETURN type=kotlin.Nothing from= CALL .print type=kotlin.Unit operator=null message: GET_VAR it type=kotlin.Int operator=null - CALLABLE_REFERENCE local final fun (/*0*/ it: kotlin.Int): kotlin.Unit type=(kotlin.Int) -> kotlin.Unit + CALLABLE_REFERENCE type=(kotlin.Int) -> kotlin.Unit operator=LAMBDA FUN public fun testLrmFoo2(/*0*/ ints: kotlin.collections.List): kotlin.Unit BLOCK_BODY CALL .forEach type=kotlin.Unit operator=null @@ -54,4 +54,4 @@ FILE /nonLocalReturn.kt RETURN type=kotlin.Nothing from= CALL .print type=kotlin.Unit operator=null message: GET_VAR it type=kotlin.Int operator=null - CALLABLE_REFERENCE local final fun (/*0*/ it: kotlin.Int): kotlin.Unit type=(kotlin.Int) -> kotlin.Unit + CALLABLE_REFERENCE type=(kotlin.Int) -> kotlin.Unit operator=LAMBDA