From 6f97db81c8248d46674dd72763822617c9fe407f Mon Sep 17 00:00:00 2001 From: Dmitry Petrov Date: Thu, 6 Dec 2018 16:54:52 +0300 Subject: [PATCH] Update testData after IR type rendering changes --- .../testData/ir/irText/classes/classes.txt | 4 +- ...gConstructorCallToTypeAliasConstructor.txt | 4 +- compiler/testData/ir/irText/classes/enum.txt | 32 +++++++-------- .../irText/classes/enumWithSecondaryCtor.txt | 20 ++++----- .../lambdaInDataClassDefaultParameter.txt | 36 ++++++++-------- .../annotations/classesWithAnnotations.txt | 4 +- .../delegateFieldWithAnnotations.txt | 4 +- .../enumEntriesWithAnnotations.txt | 8 ++-- .../enumsInAnnotationArguments.txt | 4 +- ...ocalDelegatedPropertiesWithAnnotations.txt | 4 +- .../declarations/classLevelProperties.txt | 13 +++--- .../declarations/delegatedProperties.txt | 16 ++++---- .../declarations/localDelegatedProperties.txt | 12 +++--- .../multiplatform/expectedEnumClass.txt | 8 ++-- .../declarations/packageLevelProperties.txt | 13 +++--- .../irText/declarations/parameters/class.txt | 4 +- .../parameters/genericInnerClass.txt | 9 ++-- .../declarations/parameters/lambdas.txt | 41 +++++++++---------- .../ir/irText/errors/unresolvedReference.txt | 32 +++++++-------- .../augmentedAssignmentWithExpression.txt | 7 ++-- .../irText/expressions/badBreakContinue.txt | 7 ++-- .../callableReferenceTypeArguments.txt | 25 ++++++----- .../expressions/catchParameterAccess.txt | 11 +++-- .../ir/irText/expressions/coercionToUnit.txt | 10 ++--- .../expressions/enumEntryAsReceiver.txt | 24 +++++------ .../enumEntryReferenceFromEnumEntryClass.txt | 18 ++++---- .../irText/expressions/extFunInvokeAsFun.txt | 13 +++--- .../irText/expressions/extFunSafeInvoke.txt | 6 +-- .../expressions/implicitCastToNonNull.txt | 7 ++-- .../ir/irText/expressions/kt16905.txt | 5 +-- .../ir/irText/expressions/lambdaInCAO.txt | 37 ++++++++--------- .../irText/expressions/objectAsCallable.txt | 4 +- .../ir/irText/expressions/objectReference.txt | 10 ++--- ...ferenceInClosureInSuperConstructorCall.txt | 24 +++++------ .../specializedTypeAliasConstructorCall.txt | 3 +- .../expressions/thisOfGenericOuterClass.txt | 20 ++++----- .../testData/ir/irText/expressions/values.txt | 4 +- .../expressions/variableAsFunctionCall.txt | 33 ++++++++------- .../variableAsFunctionCallWithGenerics.txt | 16 ++++---- .../ir/irText/lambdas/anonymousFunction.txt | 11 +++-- .../irText/lambdas/destructuringInLambda.txt | 17 ++++---- .../ir/irText/lambdas/extensionLambda.txt | 5 +-- .../testData/ir/irText/lambdas/justLambda.txt | 21 +++++----- .../lambdas/multipleImplicitReceivers.txt | 13 +++--- .../ir/irText/lambdas/nonLocalReturn.txt | 29 +++++++------ .../testData/ir/irText/lambdas/samAdapter.txt | 4 +- .../irText/regressions/integerCoercionToT.txt | 7 ++-- .../newInference/fixationOrder1.txt | 8 ++-- .../typeAliasCtorForGenericClass.txt | 7 ++-- .../ir/irText/singletons/enumEntry.txt | 8 ++-- .../testData/ir/irText/stubs/builtinMap.txt | 16 ++++---- .../stubs/jdkClassSyntheticProperty.txt | 4 +- .../augmentedAssignmentWithExpression.txt | 6 +-- .../ir/sourceRanges/declarations/classes.txt | 2 +- 54 files changed, 344 insertions(+), 366 deletions(-) diff --git a/compiler/testData/ir/irText/classes/classes.txt b/compiler/testData/ir/irText/classes/classes.txt index b40cbcc9a61..99b6430046d 100644 --- a/compiler/testData/ir/irText/classes/classes.txt +++ b/compiler/testData/ir/irText/classes/classes.txt @@ -83,9 +83,9 @@ FILE fqName: fileName:/classes.kt overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:TestEnumClass) returnType:kotlin.Int flags: overridden: diff --git a/compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.txt b/compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.txt index 64a19fa61b3..b04369ff0ef 100644 --- a/compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.txt +++ b/compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.txt @@ -33,7 +33,7 @@ FILE fqName: fileName:/delegatingConstructorCallToTypeAliasConstructor.kt $this: VALUE_PARAMETER name: type:kotlin.Any flags: TYPEALIAS typealias CT = Cell type=Cell TYPEALIAS typealias CStr = Cell type=Cell - CLASS CLASS name:C1 modality:FINAL visibility:public flags: superTypes:[CT /* = Cell */] + CLASS CLASS name:C1 modality:FINAL visibility:public flags: superTypes:[Cell] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:C1 flags: CONSTRUCTOR visibility:public <> () returnType:C1 flags:primary BLOCK_BODY @@ -60,7 +60,7 @@ FILE fqName: fileName:/delegatingConstructorCallToTypeAliasConstructor.kt overridden: FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: - CLASS CLASS name:C2 modality:FINAL visibility:public flags: superTypes:[CStr /* = Cell */] + CLASS CLASS name:C2 modality:FINAL visibility:public flags: superTypes:[Cell] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:C2 flags: CONSTRUCTOR visibility:public <> () returnType:C2 flags:primary BLOCK_BODY diff --git a/compiler/testData/ir/irText/classes/enum.txt b/compiler/testData/ir/irText/classes/enum.txt index be4c2f6fab9..dbf37dab7d2 100644 --- a/compiler/testData/ir/irText/classes/enum.txt +++ b/compiler/testData/ir/irText/classes/enum.txt @@ -18,9 +18,9 @@ FILE fqName: fileName:/enum.kt overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:TestEnum1) returnType:kotlin.Int flags: overridden: @@ -93,9 +93,9 @@ FILE fqName: fileName:/enum.kt overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:TestEnum2) returnType:kotlin.Int flags: overridden: @@ -164,9 +164,9 @@ FILE fqName: fileName:/enum.kt overridden: FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:TestEnum3) returnType:kotlin.Int flags: overridden: @@ -208,9 +208,9 @@ FILE fqName: fileName:/enum.kt overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:TestEnum3) returnType:kotlin.Int flags: overridden: @@ -292,9 +292,9 @@ FILE fqName: fileName:/enum.kt overridden: FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:TestEnum4) returnType:kotlin.Int flags: overridden: @@ -376,9 +376,9 @@ FILE fqName: fileName:/enum.kt overridden: FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:TestEnum4) returnType:kotlin.Int flags: overridden: @@ -429,9 +429,9 @@ FILE fqName: fileName:/enum.kt overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:TestEnum4) returnType:kotlin.Int flags: overridden: @@ -504,9 +504,9 @@ FILE fqName: fileName:/enum.kt overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:TestEnum5) returnType:kotlin.Int flags: overridden: diff --git a/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.txt b/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.txt index 9c468c780a9..1a12310d6e8 100644 --- a/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.txt +++ b/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.txt @@ -32,9 +32,9 @@ FILE fqName: fileName:/enumWithSecondaryCtor.kt overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:Test0) returnType:kotlin.Int flags: overridden: @@ -107,9 +107,9 @@ FILE fqName: fileName:/enumWithSecondaryCtor.kt overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:Test1) returnType:kotlin.Int flags: overridden: @@ -190,9 +190,9 @@ FILE fqName: fileName:/enumWithSecondaryCtor.kt overridden: FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:Test2) returnType:kotlin.Int flags: overridden: @@ -259,9 +259,9 @@ FILE fqName: fileName:/enumWithSecondaryCtor.kt overridden: FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:Test2) returnType:kotlin.Int flags: overridden: @@ -316,9 +316,9 @@ FILE fqName: fileName:/enumWithSecondaryCtor.kt overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:Test2) returnType:kotlin.Int flags: overridden: diff --git a/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.txt b/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.txt index 84bee2fea5a..23337ad4774 100644 --- a/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.txt +++ b/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.txt @@ -1,47 +1,47 @@ FILE fqName: fileName:/lambdaInDataClassDefaultParameter.kt CLASS CLASS name:A modality:FINAL visibility:public flags:data superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:A flags: - CONSTRUCTOR visibility:public <> (runA:A.(kotlin.String) -> kotlin.Unit) returnType:A flags:primary - VALUE_PARAMETER name:runA index:0 type:A.(kotlin.String) -> kotlin.Unit flags: + CONSTRUCTOR visibility:public <> (runA:@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2) returnType:A flags:primary + VALUE_PARAMETER name:runA index:0 type:@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 flags: EXPRESSION_BODY - BLOCK type=A.(kotlin.String) -> kotlin.Unit origin=LAMBDA + BLOCK type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:A, it:kotlin.String) returnType:kotlin.Unit flags: $receiver: VALUE_PARAMETER name: type:A flags: VALUE_PARAMETER name:it index:0 type:kotlin.String flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(String) on A: Unit' GET_OBJECT 'Unit' type=kotlin.Unit - FUNCTION_REFERENCE '(String) on A: Unit' type=A.(kotlin.String) -> kotlin.Unit origin=LAMBDA + FUNCTION_REFERENCE '(String) on A: Unit' type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 origin=LAMBDA BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='A' PROPERTY name:runA visibility:public modality:FINAL flags:val - FIELD PROPERTY_BACKING_FIELD name:runA type:A.(kotlin.String) -> kotlin.Unit visibility:public flags:final + FIELD PROPERTY_BACKING_FIELD name:runA type:@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 visibility:public flags:final EXPRESSION_BODY - GET_VAR 'value-parameter runA: A.(String) -> Unit = ...' type=A.(kotlin.String) -> kotlin.Unit origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:A) returnType:A.(kotlin.String) -> kotlin.Unit flags: + GET_VAR 'value-parameter runA: A.(String) -> Unit = ...' type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:A) returnType:@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 flags: correspondingProperty: PROPERTY name:runA visibility:public modality:FINAL flags:val $this: VALUE_PARAMETER name: type:A flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): A.(String) -> Unit' - GET_FIELD 'runA: A.(String) -> Unit' type=A.(kotlin.String) -> kotlin.Unit origin=null + GET_FIELD 'runA: A.(String) -> Unit' type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 origin=null receiver: GET_VAR 'this@A: A' type=A origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:A) returnType:A.(kotlin.String) -> kotlin.Unit flags: + FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:A) returnType:@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 flags: $this: VALUE_PARAMETER name: type:A flags: BLOCK_BODY RETURN type=kotlin.Nothing from='component1(): A.(String) -> Unit' - CALL '(): A.(String) -> Unit' type=A.(kotlin.String) -> kotlin.Unit origin=GET_PROPERTY + CALL '(): A.(String) -> Unit' type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 origin=GET_PROPERTY $this: GET_VAR 'this@A: A' type=A origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:A, runA:A.(kotlin.String) -> kotlin.Unit) returnType:A flags: + FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:A, runA:@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2) returnType:A flags: $this: VALUE_PARAMETER name: type:A flags: - VALUE_PARAMETER name:runA index:0 type:A.(kotlin.String) -> kotlin.Unit flags: + VALUE_PARAMETER name:runA index:0 type:@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 flags: EXPRESSION_BODY - CALL '(): A.(String) -> Unit' type=A.(kotlin.String) -> kotlin.Unit origin=GET_PROPERTY + CALL '(): A.(String) -> Unit' type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 origin=GET_PROPERTY $this: GET_VAR 'this@A: A' type=A origin=null BLOCK_BODY RETURN type=kotlin.Nothing from='copy(A.(String) -> Unit = ...): A' CALL 'constructor A(A.(String) -> Unit = ...)' type=A origin=null - runA: GET_VAR 'value-parameter runA: A.(String) -> Unit = ...' type=A.(kotlin.String) -> kotlin.Unit origin=null + runA: GET_VAR 'value-parameter runA: A.(String) -> Unit = ...' type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 origin=null FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:A) returnType:kotlin.String flags: overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags: @@ -51,7 +51,7 @@ FILE fqName: fileName:/lambdaInDataClassDefaultParameter.kt STRING_CONCATENATION type=kotlin.String CONST String type=kotlin.String value="A(" CONST String type=kotlin.String value="runA=" - CALL '(): A.(String) -> Unit' type=A.(kotlin.String) -> kotlin.Unit origin=GET_PROPERTY + CALL '(): A.(String) -> Unit' type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 origin=GET_PROPERTY $this: GET_VAR 'this@A: A' type=A origin=null CONST String type=kotlin.String value=")" FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:A) returnType:kotlin.Int flags: @@ -63,7 +63,7 @@ FILE fqName: fileName:/lambdaInDataClassDefaultParameter.kt CONST Int type=kotlin.Int value=0 SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ CALL 'hashCode(): Int' type=kotlin.Int origin=null - $this: CALL '(): A.(String) -> Unit' type=A.(kotlin.String) -> kotlin.Unit origin=GET_PROPERTY + $this: CALL '(): A.(String) -> Unit' type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 origin=GET_PROPERTY $this: GET_VAR 'this@A: A' type=A origin=null RETURN type=kotlin.Nothing from='hashCode(): Int' GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null @@ -95,9 +95,9 @@ FILE fqName: fileName:/lambdaInDataClassDefaultParameter.kt BRANCH if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ - arg0: CALL '(): A.(String) -> Unit' type=A.(kotlin.String) -> kotlin.Unit origin=GET_PROPERTY + arg0: CALL '(): A.(String) -> Unit' type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 origin=GET_PROPERTY $this: GET_VAR 'this@A: A' type=A origin=null - arg1: CALL '(): A.(String) -> Unit' type=A.(kotlin.String) -> kotlin.Unit origin=GET_PROPERTY + arg1: CALL '(): A.(String) -> Unit' type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 origin=GET_PROPERTY $this: GET_VAR 'tmp0_other_with_cast: A' type=A origin=null then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' CONST Boolean type=kotlin.Boolean value=false diff --git a/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.txt index dc45a0dd761..77cff15e868 100644 --- a/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.txt @@ -148,9 +148,9 @@ FILE fqName: fileName:/classesWithAnnotations.kt overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:TestEnum) returnType:kotlin.Int flags: overridden: diff --git a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.txt index 7756ee04c21..0767e65113f 100644 --- a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.txt @@ -22,12 +22,12 @@ FILE fqName: fileName:/delegateFieldWithAnnotations.kt EXPRESSION_BODY CALL 'lazy(() -> T): Lazy' type=kotlin.Lazy origin=null : kotlin.Int - initializer: BLOCK type=() -> kotlin.Int origin=LAMBDA + initializer: BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Int flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value=42 - FUNCTION_REFERENCE '(): Int' type=() -> kotlin.Int origin=LAMBDA + FUNCTION_REFERENCE '(): Int' type=kotlin.Function0 origin=LAMBDA FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int flags: correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL flags:delegated,val BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.txt index df53738ab74..e9f3c28e99d 100644 --- a/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.txt @@ -74,9 +74,9 @@ FILE fqName: fileName:/enumEntriesWithAnnotations.kt overridden: FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:TestEnum) returnType:kotlin.Int flags: overridden: @@ -116,9 +116,9 @@ FILE fqName: fileName:/enumEntriesWithAnnotations.kt overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:TestEnum) returnType:kotlin.Int flags: overridden: diff --git a/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.txt b/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.txt index 4ac5492c528..dd92fdb659f 100644 --- a/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.txt +++ b/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.txt @@ -22,9 +22,9 @@ FILE fqName: fileName:/enumsInAnnotationArguments.kt overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:En) returnType:kotlin.Int flags: overridden: diff --git a/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.txt index f0a10cacc0f..7d48bf5d3dd 100644 --- a/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.txt @@ -37,12 +37,12 @@ FILE fqName: fileName:/localDelegatedPropertiesWithAnnotations.kt VAR DELEGATE name:test$delegate type:kotlin.Lazy flags:val CALL 'lazy(() -> T): Lazy' type=kotlin.Lazy origin=null : kotlin.Int - initializer: BLOCK type=() -> kotlin.Int origin=LAMBDA + initializer: BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Int flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value=42 - FUNCTION_REFERENCE '(): Int' type=() -> kotlin.Int origin=LAMBDA + FUNCTION_REFERENCE '(): Int' type=kotlin.Function0 origin=LAMBDA FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:local modality:FINAL <> () returnType:kotlin.Int flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' diff --git a/compiler/testData/ir/irText/declarations/classLevelProperties.txt b/compiler/testData/ir/irText/declarations/classLevelProperties.txt index 01e95ab5a7f..79486f194cc 100644 --- a/compiler/testData/ir/irText/declarations/classLevelProperties.txt +++ b/compiler/testData/ir/irText/declarations/classLevelProperties.txt @@ -96,12 +96,12 @@ FILE fqName: fileName:/classLevelProperties.kt EXPRESSION_BODY CALL 'lazy(() -> T): Lazy' type=kotlin.Lazy origin=null : kotlin.Int - initializer: BLOCK type=() -> kotlin.Int origin=LAMBDA + initializer: BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Int flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value=42 - FUNCTION_REFERENCE '(): Int' type=() -> kotlin.Int origin=LAMBDA + FUNCTION_REFERENCE '(): Int' type=kotlin.Function0 origin=LAMBDA FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:C) returnType:kotlin.Int flags: correspondingProperty: PROPERTY name:test7 visibility:public modality:FINAL flags:delegated,val $this: VALUE_PARAMETER name: type:C flags: @@ -114,9 +114,9 @@ FILE fqName: fileName:/classLevelProperties.kt thisRef: GET_VAR 'this@C: C' type=C origin=null property: PROPERTY_REFERENCE 'test7: Int' field=null getter='(): Int' setter=null type=kotlin.reflect.KProperty1 origin=PROPERTY_REFERENCE_FOR_DELEGATE PROPERTY name:test8 visibility:public modality:FINAL flags:delegated,var - FIELD DELEGATE name:test8$delegate type:kotlin.collections.HashMap /* = java.util.HashMap */ visibility:private flags:final + FIELD DELEGATE name:test8$delegate type:java.util.HashMap visibility:private flags:final EXPRESSION_BODY - CALL 'hashMapOf(): HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null + CALL 'hashMapOf(): HashMap /* = HashMap */' type=java.util.HashMap origin=null : kotlin.String : kotlin.Int FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:C) returnType:kotlin.Int flags: @@ -127,7 +127,7 @@ FILE fqName: fileName:/classLevelProperties.kt CALL 'getValue(Any?, KProperty<*>) on MutableMap: V1' type=kotlin.Int origin=null : kotlin.Int : kotlin.Int - $receiver: GET_FIELD '`test8$delegate`: HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null + $receiver: GET_FIELD '`test8$delegate`: HashMap /* = HashMap */' type=java.util.HashMap origin=null receiver: GET_VAR 'this@C: C' type=C origin=null thisRef: GET_VAR 'this@C: C' type=C origin=null property: PROPERTY_REFERENCE 'test8: Int' field=null getter='(): Int' setter='(Int): Unit' type=kotlin.reflect.KMutableProperty1 origin=PROPERTY_REFERENCE_FOR_DELEGATE @@ -139,7 +139,7 @@ FILE fqName: fileName:/classLevelProperties.kt RETURN type=kotlin.Nothing from='(Int): Unit' CALL 'setValue(Any?, KProperty<*>, V) on MutableMap: Unit' type=kotlin.Unit origin=null : kotlin.Int - $receiver: GET_FIELD '`test8$delegate`: HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null + $receiver: GET_FIELD '`test8$delegate`: HashMap /* = HashMap */' type=java.util.HashMap origin=null receiver: GET_VAR 'this@C: C' type=C origin=null thisRef: GET_VAR 'this@C: C' type=C origin=null property: PROPERTY_REFERENCE 'test8: Int' field=null getter='(): Int' setter='(Int): Unit' type=kotlin.reflect.KMutableProperty1 origin=PROPERTY_REFERENCE_FOR_DELEGATE @@ -157,4 +157,3 @@ FILE fqName: fileName:/classLevelProperties.kt overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: - diff --git a/compiler/testData/ir/irText/declarations/delegatedProperties.txt b/compiler/testData/ir/irText/declarations/delegatedProperties.txt index fc48d4e2e30..131cbc00335 100644 --- a/compiler/testData/ir/irText/declarations/delegatedProperties.txt +++ b/compiler/testData/ir/irText/declarations/delegatedProperties.txt @@ -4,12 +4,12 @@ FILE fqName: fileName:/delegatedProperties.kt EXPRESSION_BODY CALL 'lazy(() -> T): Lazy' type=kotlin.Lazy origin=null : kotlin.Int - initializer: BLOCK type=() -> kotlin.Int origin=LAMBDA + initializer: BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Int flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value=42 - FUNCTION_REFERENCE '(): Int' type=() -> kotlin.Int origin=LAMBDA + FUNCTION_REFERENCE '(): Int' type=kotlin.Function0 origin=LAMBDA FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int flags: correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL flags:delegated,val BLOCK_BODY @@ -42,12 +42,12 @@ FILE fqName: fileName:/delegatedProperties.kt EXPRESSION_BODY CALL 'lazy(() -> T): Lazy' type=kotlin.Lazy origin=null : kotlin.Int - initializer: BLOCK type=() -> kotlin.Int origin=LAMBDA + initializer: BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Int flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value=42 - FUNCTION_REFERENCE '(): Int' type=() -> kotlin.Int origin=LAMBDA + FUNCTION_REFERENCE '(): Int' type=kotlin.Function0 origin=LAMBDA FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:C) returnType:kotlin.Int flags: correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL flags:delegated,val $this: VALUE_PARAMETER name: type:C flags: @@ -103,9 +103,9 @@ FILE fqName: fileName:/delegatedProperties.kt FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: PROPERTY name:test4 visibility:public modality:FINAL flags:delegated,var - FIELD DELEGATE name:test4$delegate type:kotlin.collections.HashMap /* = java.util.HashMap */ visibility:private flags:final,static + FIELD DELEGATE name:test4$delegate type:java.util.HashMap visibility:private flags:final,static EXPRESSION_BODY - CALL 'hashMapOf(): HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null + CALL 'hashMapOf(): HashMap /* = HashMap */' type=java.util.HashMap origin=null : kotlin.String : kotlin.Any FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Any flags: @@ -115,7 +115,7 @@ FILE fqName: fileName:/delegatedProperties.kt CALL 'getValue(Any?, KProperty<*>) on MutableMap: V1' type=kotlin.Any origin=null : kotlin.Any : kotlin.Any - $receiver: GET_FIELD '`test4$delegate`: HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null + $receiver: GET_FIELD '`test4$delegate`: HashMap /* = HashMap */' type=java.util.HashMap origin=null thisRef: CONST Null type=kotlin.Nothing? value=null property: PROPERTY_REFERENCE 'test4: Any' field=null getter='(): Any' setter='(Any): Unit' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:kotlin.Any) returnType:kotlin.Unit flags: @@ -125,7 +125,7 @@ FILE fqName: fileName:/delegatedProperties.kt RETURN type=kotlin.Nothing from='(Any): Unit' CALL 'setValue(Any?, KProperty<*>, V) on MutableMap: Unit' type=kotlin.Unit origin=null : kotlin.Any - $receiver: GET_FIELD '`test4$delegate`: HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null + $receiver: GET_FIELD '`test4$delegate`: HashMap /* = HashMap */' type=java.util.HashMap origin=null thisRef: CONST Null type=kotlin.Nothing? value=null property: PROPERTY_REFERENCE 'test4: Any' field=null getter='(): Any' setter='(Any): Unit' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE value: GET_VAR 'value-parameter : Any' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt b/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt index 965a03d20d9..e1c04317fef 100644 --- a/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt +++ b/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt @@ -5,12 +5,12 @@ FILE fqName: fileName:/localDelegatedProperties.kt VAR DELEGATE name:x$delegate type:kotlin.Lazy flags:val CALL 'lazy(() -> T): Lazy' type=kotlin.Lazy origin=null : kotlin.Int - initializer: BLOCK type=() -> kotlin.Int origin=LAMBDA + initializer: BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Int flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value=42 - FUNCTION_REFERENCE '(): Int' type=() -> kotlin.Int origin=LAMBDA + FUNCTION_REFERENCE '(): Int' type=kotlin.Function0 origin=LAMBDA FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:local modality:FINAL <> () returnType:kotlin.Int flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' @@ -24,8 +24,8 @@ FILE fqName: fileName:/localDelegatedProperties.kt FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY LOCAL_DELEGATED_PROPERTY name:x type:kotlin.Int flags:var - VAR DELEGATE name:x$delegate type:kotlin.collections.HashMap /* = java.util.HashMap */ flags:val - CALL 'hashMapOf(): HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null + VAR DELEGATE name:x$delegate type:java.util.HashMap flags:val + CALL 'hashMapOf(): HashMap /* = HashMap */' type=java.util.HashMap origin=null : kotlin.String : kotlin.Int FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:local modality:FINAL <> () returnType:kotlin.Int flags: @@ -34,7 +34,7 @@ FILE fqName: fileName:/localDelegatedProperties.kt CALL 'getValue(Any?, KProperty<*>) on MutableMap: V1' type=kotlin.Int origin=null : kotlin.Int : kotlin.Int - $receiver: GET_VAR '`x$delegate`: HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null + $receiver: GET_VAR '`x$delegate`: HashMap /* = HashMap */' type=java.util.HashMap origin=null thisRef: CONST Null type=kotlin.Nothing? value=null property: LOCAL_DELEGATED_PROPERTY_REFERENCE 'x: Int' delegate='`x$delegate`: HashMap /* = HashMap */' getter='(): Int' setter='(Int): Unit' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:local modality:FINAL <> (value:kotlin.Int) returnType:kotlin.Unit flags: @@ -43,7 +43,7 @@ FILE fqName: fileName:/localDelegatedProperties.kt RETURN type=kotlin.Nothing from='(Int): Unit' CALL 'setValue(Any?, KProperty<*>, V) on MutableMap: Unit' type=kotlin.Unit origin=null : kotlin.Int - $receiver: GET_VAR '`x$delegate`: HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null + $receiver: GET_VAR '`x$delegate`: HashMap /* = HashMap */' type=java.util.HashMap origin=null thisRef: CONST Null type=kotlin.Nothing? value=null property: LOCAL_DELEGATED_PROPERTY_REFERENCE 'x: Int' delegate='`x$delegate`: HashMap /* = HashMap */' getter='(): Int' setter='(Int): Unit' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE value: GET_VAR 'value-parameter value: Int' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.txt b/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.txt index 8c094232086..00d3cf75a8d 100644 --- a/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.txt +++ b/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.txt @@ -11,9 +11,9 @@ FILE fqName: fileName:/expectedEnumClass.kt overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:MyEnum) returnType:kotlin.Int flags: overridden: @@ -71,9 +71,9 @@ FILE fqName: fileName:/expectedEnumClass.kt overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:MyEnum) returnType:kotlin.Int flags: overridden: diff --git a/compiler/testData/ir/irText/declarations/packageLevelProperties.txt b/compiler/testData/ir/irText/declarations/packageLevelProperties.txt index 4bb42ba2a75..72ada8c80c4 100644 --- a/compiler/testData/ir/irText/declarations/packageLevelProperties.txt +++ b/compiler/testData/ir/irText/declarations/packageLevelProperties.txt @@ -73,12 +73,12 @@ FILE fqName: fileName:/packageLevelProperties.kt EXPRESSION_BODY CALL 'lazy(() -> T): Lazy' type=kotlin.Lazy origin=null : kotlin.Int - initializer: BLOCK type=() -> kotlin.Int origin=LAMBDA + initializer: BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Int flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value=42 - FUNCTION_REFERENCE '(): Int' type=() -> kotlin.Int origin=LAMBDA + FUNCTION_REFERENCE '(): Int' type=kotlin.Function0 origin=LAMBDA FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int flags: correspondingProperty: PROPERTY name:test7 visibility:public modality:FINAL flags:delegated,val BLOCK_BODY @@ -89,9 +89,9 @@ FILE fqName: fileName:/packageLevelProperties.kt thisRef: CONST Null type=kotlin.Nothing? value=null property: PROPERTY_REFERENCE 'test7: Int' field=null getter='(): Int' setter=null type=kotlin.reflect.KProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE PROPERTY name:test8 visibility:public modality:FINAL flags:delegated,var - FIELD DELEGATE name:test8$delegate type:kotlin.collections.HashMap /* = java.util.HashMap */ visibility:private flags:final,static + FIELD DELEGATE name:test8$delegate type:java.util.HashMap visibility:private flags:final,static EXPRESSION_BODY - CALL 'hashMapOf(): HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null + CALL 'hashMapOf(): HashMap /* = HashMap */' type=java.util.HashMap origin=null : kotlin.String : kotlin.Int FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int flags: @@ -101,7 +101,7 @@ FILE fqName: fileName:/packageLevelProperties.kt CALL 'getValue(Any?, KProperty<*>) on MutableMap: V1' type=kotlin.Int origin=null : kotlin.Int : kotlin.Int - $receiver: GET_FIELD '`test8$delegate`: HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null + $receiver: GET_FIELD '`test8$delegate`: HashMap /* = HashMap */' type=java.util.HashMap origin=null thisRef: CONST Null type=kotlin.Nothing? value=null property: PROPERTY_REFERENCE 'test8: Int' field=null getter='(): Int' setter='(Int): Unit' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:kotlin.Int) returnType:kotlin.Unit flags: @@ -111,8 +111,7 @@ FILE fqName: fileName:/packageLevelProperties.kt RETURN type=kotlin.Nothing from='(Int): Unit' CALL 'setValue(Any?, KProperty<*>, V) on MutableMap: Unit' type=kotlin.Unit origin=null : kotlin.Int - $receiver: GET_FIELD '`test8$delegate`: HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null + $receiver: GET_FIELD '`test8$delegate`: HashMap /* = HashMap */' type=java.util.HashMap origin=null thisRef: CONST Null type=kotlin.Nothing? value=null property: PROPERTY_REFERENCE 'test8: Int' field=null getter='(): Int' setter='(Int): Unit' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE value: GET_VAR 'value-parameter : Int' type=kotlin.Int origin=null - diff --git a/compiler/testData/ir/irText/declarations/parameters/class.txt b/compiler/testData/ir/irText/declarations/parameters/class.txt index 5d8b24cba4d..1768b2877b5 100644 --- a/compiler/testData/ir/irText/declarations/parameters/class.txt +++ b/compiler/testData/ir/irText/declarations/parameters/class.txt @@ -59,9 +59,9 @@ FILE fqName: fileName:/class.kt FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: CLASS CLASS name:TestInner modality:FINAL visibility:public flags:inner superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:Test.TestInner flags: + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:Test.TestInner flags: TYPE_PARAMETER name:T2 index:0 variance: superTypes:[kotlin.Any?] - CONSTRUCTOR visibility:public <> ($this:Test) returnType:Test.TestInner flags:primary + CONSTRUCTOR visibility:public <> ($this:Test) returnType:Test.TestInner flags:primary $outer: VALUE_PARAMETER name: type:Test flags: BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' diff --git a/compiler/testData/ir/irText/declarations/parameters/genericInnerClass.txt b/compiler/testData/ir/irText/declarations/parameters/genericInnerClass.txt index dc39edc703b..b2124a670d2 100644 --- a/compiler/testData/ir/irText/declarations/parameters/genericInnerClass.txt +++ b/compiler/testData/ir/irText/declarations/parameters/genericInnerClass.txt @@ -7,15 +7,15 @@ FILE fqName: fileName:/genericInnerClass.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='Outer' CLASS CLASS name:Inner modality:FINAL visibility:public flags:inner superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:Outer.Inner flags: + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:Outer.Inner flags: TYPE_PARAMETER name:T2 index:0 variance: superTypes:[kotlin.Any?] - CONSTRUCTOR visibility:public <> ($this:Outer) returnType:Outer.Inner flags:primary + CONSTRUCTOR visibility:public <> ($this:Outer) returnType:Outer.Inner flags:primary $outer: VALUE_PARAMETER name: type:Outer flags: BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='Inner' - FUN name:foo visibility:public modality:FINAL <> ($this:Outer.Inner, x1:T1, x2:T2) returnType:kotlin.Unit flags: - $this: VALUE_PARAMETER name: type:Outer.Inner flags: + FUN name:foo visibility:public modality:FINAL <> ($this:Outer.Inner, x1:T1, x2:T2) returnType:kotlin.Unit flags: + $this: VALUE_PARAMETER name: type:Outer.Inner flags: VALUE_PARAMETER name:x1 index:0 type:T1 flags: VALUE_PARAMETER name:x2 index:1 type:T2 flags: BLOCK_BODY @@ -45,4 +45,3 @@ FILE fqName: fileName:/genericInnerClass.kt overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: - diff --git a/compiler/testData/ir/irText/declarations/parameters/lambdas.txt b/compiler/testData/ir/irText/declarations/parameters/lambdas.txt index cc08a16a3cd..2dd5180581d 100644 --- a/compiler/testData/ir/irText/declarations/parameters/lambdas.txt +++ b/compiler/testData/ir/irText/declarations/parameters/lambdas.txt @@ -1,23 +1,23 @@ FILE fqName: fileName:/lambdas.kt PROPERTY name:test1 visibility:public modality:FINAL flags:val - FIELD PROPERTY_BACKING_FIELD name:test1 type:(kotlin.String) -> kotlin.String visibility:public flags:final,static + FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Function1 visibility:public flags:final,static EXPRESSION_BODY - BLOCK type=(kotlin.String) -> kotlin.String origin=LAMBDA + BLOCK type=kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.String) returnType:kotlin.String flags: VALUE_PARAMETER name:it index:0 type:kotlin.String flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(String): String' GET_VAR 'value-parameter it: String' type=kotlin.String origin=null - FUNCTION_REFERENCE '(String): String' type=(kotlin.String) -> kotlin.String origin=LAMBDA - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:(kotlin.String) -> kotlin.String flags: + FUNCTION_REFERENCE '(String): String' type=kotlin.Function1 origin=LAMBDA + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function1 flags: correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL flags:val BLOCK_BODY RETURN type=kotlin.Nothing from='(): (String) -> String' - GET_FIELD 'test1: (String) -> String' type=(kotlin.String) -> kotlin.String origin=null + GET_FIELD 'test1: (String) -> String' type=kotlin.Function1 origin=null PROPERTY name:test2 visibility:public modality:FINAL flags:val - FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Any.(kotlin.Any) -> kotlin.Any visibility:public flags:final,static + FIELD PROPERTY_BACKING_FIELD name:test2 type:@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 visibility:public flags:final,static EXPRESSION_BODY - BLOCK type=kotlin.Any.(kotlin.Any) -> kotlin.Int origin=LAMBDA + BLOCK type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:kotlin.Any, it:kotlin.Any) returnType:kotlin.Int flags: $receiver: VALUE_PARAMETER name: type:kotlin.Any flags: VALUE_PARAMETER name:it index:0 type:kotlin.Any flags: @@ -25,40 +25,39 @@ FILE fqName: fileName:/lambdas.kt RETURN type=kotlin.Nothing from='(Any) on Any: Int' CALL 'hashCode(): Int' type=kotlin.Int origin=null $this: GET_VAR 'value-parameter it: Any' type=kotlin.Any origin=null - FUNCTION_REFERENCE '(Any) on Any: Int' type=kotlin.Any.(kotlin.Any) -> kotlin.Int origin=LAMBDA - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Any.(kotlin.Any) -> kotlin.Any flags: + FUNCTION_REFERENCE '(Any) on Any: Int' type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 origin=LAMBDA + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 flags: correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL flags:val BLOCK_BODY RETURN type=kotlin.Nothing from='(): Any.(Any) -> Any' - GET_FIELD 'test2: Any.(Any) -> Any' type=kotlin.Any.(kotlin.Any) -> kotlin.Any origin=null + GET_FIELD 'test2: Any.(Any) -> Any' type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function2 origin=null PROPERTY name:test3 visibility:public modality:FINAL flags:val - FIELD PROPERTY_BACKING_FIELD name:test3 type:(kotlin.Int, kotlin.Int) -> kotlin.Unit visibility:public flags:final,static + FIELD PROPERTY_BACKING_FIELD name:test3 type:kotlin.Function2 visibility:public flags:final,static EXPRESSION_BODY - BLOCK type=(kotlin.Int, kotlin.Int) -> kotlin.Unit origin=LAMBDA + BLOCK type=kotlin.Function2 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (i:kotlin.Int, j:kotlin.Int) returnType:kotlin.Unit flags: VALUE_PARAMETER name:i index:0 type:kotlin.Int flags: VALUE_PARAMETER name:j index:1 type:kotlin.Int flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(Int, Int): Unit' GET_OBJECT 'Unit' type=kotlin.Unit - FUNCTION_REFERENCE '(Int, Int): Unit' type=(kotlin.Int, kotlin.Int) -> kotlin.Unit origin=LAMBDA - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:(kotlin.Int, kotlin.Int) -> kotlin.Unit flags: + FUNCTION_REFERENCE '(Int, Int): Unit' type=kotlin.Function2 origin=LAMBDA + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function2 flags: correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL flags:val BLOCK_BODY RETURN type=kotlin.Nothing from='(): (Int, Int) -> Unit' - GET_FIELD 'test3: (Int, Int) -> Unit' type=(kotlin.Int, kotlin.Int) -> kotlin.Unit origin=null + GET_FIELD 'test3: (Int, Int) -> Unit' type=kotlin.Function2 origin=null PROPERTY name:test4 visibility:public modality:FINAL flags:val - FIELD PROPERTY_BACKING_FIELD name:test4 type:(kotlin.Int, kotlin.Int) -> kotlin.Unit visibility:public flags:final,static + FIELD PROPERTY_BACKING_FIELD name:test4 type:kotlin.Function2 visibility:public flags:final,static EXPRESSION_BODY - BLOCK type=(kotlin.Int, kotlin.Int) -> kotlin.Unit origin=ANONYMOUS_FUNCTION + BLOCK type=kotlin.Function2 origin=ANONYMOUS_FUNCTION FUN name: visibility:local modality:FINAL <> (i:kotlin.Int, j:kotlin.Int) returnType:kotlin.Unit flags: VALUE_PARAMETER name:i index:0 type:kotlin.Int flags: VALUE_PARAMETER name:j index:1 type:kotlin.Int flags: BLOCK_BODY - FUNCTION_REFERENCE '(Int, Int): Unit' type=(kotlin.Int, kotlin.Int) -> kotlin.Unit origin=ANONYMOUS_FUNCTION - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:(kotlin.Int, kotlin.Int) -> kotlin.Unit flags: + FUNCTION_REFERENCE '(Int, Int): Unit' type=kotlin.Function2 origin=ANONYMOUS_FUNCTION + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function2 flags: correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL flags:val BLOCK_BODY RETURN type=kotlin.Nothing from='(): (Int, Int) -> Unit' - GET_FIELD 'test4: (Int, Int) -> Unit' type=(kotlin.Int, kotlin.Int) -> kotlin.Unit origin=null - + GET_FIELD 'test4: (Int, Int) -> Unit' type=kotlin.Function2 origin=null diff --git a/compiler/testData/ir/irText/errors/unresolvedReference.txt b/compiler/testData/ir/irText/errors/unresolvedReference.txt index 50e839b252c..b8c280aff1b 100644 --- a/compiler/testData/ir/irText/errors/unresolvedReference.txt +++ b/compiler/testData/ir/irText/errors/unresolvedReference.txt @@ -1,39 +1,39 @@ FILE fqName: fileName:/unresolvedReference.kt PROPERTY name:test1 visibility:public modality:FINAL flags:val - FIELD PROPERTY_BACKING_FIELD name:test1 type:[ERROR : Type for unresolved] visibility:public flags:final,static + FIELD PROPERTY_BACKING_FIELD name:test1 type:ERROR visibility:public flags:final,static EXPRESSION_BODY - ERROR_CALL '' type=[ERROR : ] - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:[ERROR : Type for unresolved] flags: + ERROR_CALL '' type=ERROR + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:ERROR flags: correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL flags:val BLOCK_BODY RETURN type=kotlin.Nothing from='(): [ERROR : Type for unresolved]' - GET_FIELD 'test1: [ERROR : Type for unresolved]' type=[ERROR : Type for unresolved] origin=null + GET_FIELD 'test1: [ERROR : Type for unresolved]' type=ERROR origin=null PROPERTY name:test2 visibility:public modality:FINAL flags:val - FIELD PROPERTY_BACKING_FIELD name:test2 type:[ERROR : Unresolved] visibility:public flags:final,static + FIELD PROPERTY_BACKING_FIELD name:test2 type:ERROR visibility:public flags:final,static EXPRESSION_BODY - ERROR_CALL '' type=[ERROR : ] - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:[ERROR : Unresolved] flags: + ERROR_CALL '' type=ERROR + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:ERROR flags: correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL flags:val BLOCK_BODY RETURN type=kotlin.Nothing from='(): [ERROR : Unresolved]' - GET_FIELD 'test2: [ERROR : Unresolved]' type=[ERROR : Unresolved] origin=null + GET_FIELD 'test2: [ERROR : Unresolved]' type=ERROR origin=null PROPERTY name:test3 visibility:public modality:FINAL flags:val - FIELD PROPERTY_BACKING_FIELD name:test3 type:[ERROR : Type for 42.unresolved(56)] visibility:public flags:final,static + FIELD PROPERTY_BACKING_FIELD name:test3 type:ERROR visibility:public flags:final,static EXPRESSION_BODY - ERROR_CALL '' type=[ERROR : ] + ERROR_CALL '' type=ERROR receiver: CONST Int type=kotlin.Int value=42 CONST Int type=kotlin.Int value=56 - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:[ERROR : Type for 42.unresolved(56)] flags: + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:ERROR flags: correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL flags:val BLOCK_BODY RETURN type=kotlin.Nothing from='(): [ERROR : Type for 42.unresolved(56)]' - GET_FIELD 'test3: [ERROR : Type for 42.unresolved(56)]' type=[ERROR : Type for 42.unresolved(56)] origin=null + GET_FIELD 'test3: [ERROR : Type for 42.unresolved(56)]' type=ERROR origin=null PROPERTY name:test4 visibility:public modality:FINAL flags:val - FIELD PROPERTY_BACKING_FIELD name:test4 type:[ERROR : Type for 42 *] visibility:public flags:final,static + FIELD PROPERTY_BACKING_FIELD name:test4 type:ERROR visibility:public flags:final,static EXPRESSION_BODY - ERROR_EXPR '' type=[ERROR : ] - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:[ERROR : Type for 42 *] flags: + ERROR_EXPR '' type=ERROR + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:ERROR flags: correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL flags:val BLOCK_BODY RETURN type=kotlin.Nothing from='(): [ERROR : Type for 42 *]' - GET_FIELD 'test4: [ERROR : Type for 42 *]' type=[ERROR : Type for 42 *] origin=null + GET_FIELD 'test4: [ERROR : Type for 42 *]' type=ERROR origin=null diff --git a/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.txt b/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.txt index 37883583b3e..594a808c798 100644 --- a/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.txt +++ b/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.txt @@ -43,11 +43,10 @@ FILE fqName: fileName:/augmentedAssignmentWithExpression.kt CALL 'plusAssign(Int): Unit' type=kotlin.Unit origin=PLUSEQ $this: CALL 'foo(): Host' type=Host origin=null x: CONST Int type=kotlin.Int value=1 - FUN name:test4 visibility:public modality:FINAL <> (a:() -> Host) returnType:kotlin.Unit flags: - VALUE_PARAMETER name:a index:0 type:() -> Host flags: + FUN name:test4 visibility:public modality:FINAL <> (a:kotlin.Function0) returnType:kotlin.Unit flags: + VALUE_PARAMETER name:a index:0 type:kotlin.Function0 flags: BLOCK_BODY CALL 'plusAssign(Int): Unit' type=kotlin.Unit origin=PLUSEQ $this: CALL 'invoke(): R' type=Host origin=INVOKE - $this: GET_VAR 'value-parameter a: () -> Host' type=() -> Host origin=VARIABLE_AS_FUNCTION + $this: GET_VAR 'value-parameter a: () -> Host' type=kotlin.Function0 origin=VARIABLE_AS_FUNCTION x: CONST Int type=kotlin.Int value=1 - diff --git a/compiler/testData/ir/irText/expressions/badBreakContinue.txt b/compiler/testData/ir/irText/expressions/badBreakContinue.txt index 9ebf9aa6695..306d8e8f1d1 100644 --- a/compiler/testData/ir/irText/expressions/badBreakContinue.txt +++ b/compiler/testData/ir/irText/expressions/badBreakContinue.txt @@ -15,13 +15,13 @@ FILE fqName: fileName:/badBreakContinue.kt WHILE label=L1 origin=WHILE_LOOP condition: CONST Boolean type=kotlin.Boolean value=true body: BLOCK type=kotlin.Unit origin=null - VAR name:lambda type:() -> kotlin.Nothing flags:val - BLOCK type=() -> kotlin.Nothing origin=LAMBDA + VAR name:lambda type:kotlin.Function0 flags:val + BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Nothing flags: BLOCK_BODY ERROR_EXPR 'Loop not found for break expression: break@L1' type=kotlin.Nothing ERROR_EXPR 'Loop not found for continue expression: continue@L1' type=kotlin.Nothing - FUNCTION_REFERENCE '(): Nothing' type=() -> kotlin.Nothing origin=LAMBDA + FUNCTION_REFERENCE '(): Nothing' type=kotlin.Function0 origin=LAMBDA FUN name:test4 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY WHILE label=null origin=WHILE_LOOP @@ -30,4 +30,3 @@ FILE fqName: fileName:/badBreakContinue.kt WHILE label=null origin=WHILE_LOOP condition: ERROR_EXPR 'Loop not found for continue expression: continue' type=kotlin.Nothing body: BLOCK type=kotlin.Unit origin=null - diff --git a/compiler/testData/ir/irText/expressions/callableReferenceTypeArguments.txt b/compiler/testData/ir/irText/expressions/callableReferenceTypeArguments.txt index 0b2d043f438..0a949fb968b 100644 --- a/compiler/testData/ir/irText/expressions/callableReferenceTypeArguments.txt +++ b/compiler/testData/ir/irText/expressions/callableReferenceTypeArguments.txt @@ -32,34 +32,33 @@ FILE fqName: fileName:/callableReferenceTypeArguments.kt VALUE_PARAMETER name:x index:0 type:kotlin.collections.List flags: BLOCK_BODY PROPERTY name:test1 visibility:public modality:FINAL flags:val - FIELD PROPERTY_BACKING_FIELD name:test1 type:(kotlin.Int) -> kotlin.Unit visibility:public flags:final,static + FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Function1 visibility:public flags:final,static EXPRESSION_BODY - FUNCTION_REFERENCE 'topLevel1(T): Unit' type=kotlin.reflect.KFunction1<@kotlin.ParameterName kotlin.Int, kotlin.Unit> origin=null + FUNCTION_REFERENCE 'topLevel1(T): Unit' type=kotlin.reflect.KFunction1<@[CALL 'constructor ParameterName(String)' type=kotlin.ParameterName origin=null] kotlin.Int, kotlin.Unit> origin=null : kotlin.Int - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:(kotlin.Int) -> kotlin.Unit flags: + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function1 flags: correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL flags:val BLOCK_BODY RETURN type=kotlin.Nothing from='(): (Int) -> Unit' - GET_FIELD 'test1: (Int) -> Unit' type=(kotlin.Int) -> kotlin.Unit origin=null + GET_FIELD 'test1: (Int) -> Unit' type=kotlin.Function1 origin=null PROPERTY name:test2 visibility:public modality:FINAL flags:val - FIELD PROPERTY_BACKING_FIELD name:test2 type:(kotlin.collections.List) -> kotlin.Unit visibility:public flags:final,static + FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Function1, kotlin.Unit> visibility:public flags:final,static EXPRESSION_BODY - FUNCTION_REFERENCE 'topLevel2(List): Unit' type=kotlin.reflect.KFunction1<@kotlin.ParameterName kotlin.collections.List, kotlin.Unit> origin=null + FUNCTION_REFERENCE 'topLevel2(List): Unit' type=kotlin.reflect.KFunction1<@[CALL 'constructor ParameterName(String)' type=kotlin.ParameterName origin=null] kotlin.collections.List, kotlin.Unit> origin=null : kotlin.String - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:(kotlin.collections.List) -> kotlin.Unit flags: + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function1, kotlin.Unit> flags: correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL flags:val BLOCK_BODY RETURN type=kotlin.Nothing from='(): (List) -> Unit' - GET_FIELD 'test2: (List) -> Unit' type=(kotlin.collections.List) -> kotlin.Unit origin=null + GET_FIELD 'test2: (List) -> Unit' type=kotlin.Function1, kotlin.Unit> origin=null PROPERTY name:test3 visibility:public modality:FINAL flags:val - FIELD PROPERTY_BACKING_FIELD name:test3 type:(kotlin.Int) -> kotlin.Unit visibility:public flags:final,static + FIELD PROPERTY_BACKING_FIELD name:test3 type:kotlin.Function1 visibility:public flags:final,static EXPRESSION_BODY - FUNCTION_REFERENCE 'objectMember(T): Unit' type=kotlin.reflect.KFunction1<@kotlin.ParameterName kotlin.Int, kotlin.Unit> origin=null + FUNCTION_REFERENCE 'objectMember(T): Unit' type=kotlin.reflect.KFunction1<@[CALL 'constructor ParameterName(String)' type=kotlin.ParameterName origin=null] kotlin.Int, kotlin.Unit> origin=null : kotlin.Int $this: GET_OBJECT 'Host' type=Host - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:(kotlin.Int) -> kotlin.Unit flags: + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function1 flags: correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL flags:val BLOCK_BODY RETURN type=kotlin.Nothing from='(): (Int) -> Unit' - GET_FIELD 'test3: (Int) -> Unit' type=(kotlin.Int) -> kotlin.Unit origin=null - + GET_FIELD 'test3: (Int) -> Unit' type=kotlin.Function1 origin=null diff --git a/compiler/testData/ir/irText/expressions/catchParameterAccess.txt b/compiler/testData/ir/irText/expressions/catchParameterAccess.txt index 59cb2b521a6..80ede782c06 100644 --- a/compiler/testData/ir/irText/expressions/catchParameterAccess.txt +++ b/compiler/testData/ir/irText/expressions/catchParameterAccess.txt @@ -1,15 +1,14 @@ FILE fqName: fileName:/catchParameterAccess.kt - FUN name:test visibility:public modality:FINAL <> (f:() -> kotlin.Unit) returnType:kotlin.Unit flags: - VALUE_PARAMETER name:f index:0 type:() -> kotlin.Unit flags: + FUN name:test visibility:public modality:FINAL <> (f:kotlin.Function0) returnType:kotlin.Unit flags: + VALUE_PARAMETER name:f index:0 type:kotlin.Function0 flags: BLOCK_BODY RETURN type=kotlin.Nothing from='test(() -> Unit): Unit' TRY type=kotlin.Unit try: BLOCK type=kotlin.Unit origin=null CALL 'invoke(): R' type=kotlin.Unit origin=INVOKE - $this: GET_VAR 'value-parameter f: () -> Unit' type=() -> kotlin.Unit origin=VARIABLE_AS_FUNCTION + $this: GET_VAR 'value-parameter f: () -> Unit' type=kotlin.Function0 origin=VARIABLE_AS_FUNCTION CATCH parameter=e: Exception /* = Exception */ - VAR CATCH_PARAMETER name:e type:kotlin.Exception /* = java.lang.Exception */ flags:val + VAR CATCH_PARAMETER name:e type:java.lang.Exception flags:val BLOCK type=kotlin.Nothing origin=null THROW type=kotlin.Nothing - GET_VAR 'e: Exception /* = Exception */' type=kotlin.Exception /* = java.lang.Exception */ origin=null - + GET_VAR 'e: Exception /* = Exception */' type=java.lang.Exception origin=null diff --git a/compiler/testData/ir/irText/expressions/coercionToUnit.txt b/compiler/testData/ir/irText/expressions/coercionToUnit.txt index 4085665ad24..8d86af6ee6b 100644 --- a/compiler/testData/ir/irText/expressions/coercionToUnit.txt +++ b/compiler/testData/ir/irText/expressions/coercionToUnit.txt @@ -1,20 +1,20 @@ FILE fqName: fileName:/coercionToUnit.kt PROPERTY name:test1 visibility:public modality:FINAL flags:val - FIELD PROPERTY_BACKING_FIELD name:test1 type:() -> kotlin.Unit visibility:public flags:final,static + FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Function0 visibility:public flags:final,static EXPRESSION_BODY - BLOCK type=() -> kotlin.Unit origin=LAMBDA + BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Unit' TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags: superTypes:[kotlin.Any] CONST Int type=kotlin.Int value=42 - FUNCTION_REFERENCE '(): Unit' type=() -> kotlin.Unit origin=LAMBDA - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:() -> kotlin.Unit flags: + FUNCTION_REFERENCE '(): Unit' type=kotlin.Function0 origin=LAMBDA + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function0 flags: correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL flags:val BLOCK_BODY RETURN type=kotlin.Nothing from='(): () -> Unit' - GET_FIELD 'test1: () -> Unit' type=() -> kotlin.Unit origin=null + GET_FIELD 'test1: () -> Unit' type=kotlin.Function0 origin=null FUN name:test2 visibility:public modality:FINAL <> (mc:kotlin.collections.MutableCollection) returnType:kotlin.Unit flags: VALUE_PARAMETER name:mc index:0 type:kotlin.collections.MutableCollection flags: BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.txt b/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.txt index d85ad5bf4d4..fed23b5c37d 100644 --- a/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.txt +++ b/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.txt @@ -28,23 +28,23 @@ FILE fqName: fileName:/enumEntryAsReceiver.kt GET_FIELD 'value2: String' type=kotlin.String origin=null receiver: GET_VAR 'this@B: B' type=X.B origin=null PROPERTY name:value visibility:public modality:OPEN flags:val - FIELD PROPERTY_BACKING_FIELD name:value type:() -> kotlin.String visibility:public flags:final + FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.Function0 visibility:public flags:final EXPRESSION_BODY - BLOCK type=() -> kotlin.String origin=LAMBDA + BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): String' CALL '(): String' type=kotlin.String origin=GET_PROPERTY $this: GET_ENUM 'B' type=X.B - FUNCTION_REFERENCE '(): String' type=() -> kotlin.String origin=LAMBDA - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN <> ($this:X.B) returnType:() -> kotlin.String flags: + FUNCTION_REFERENCE '(): String' type=kotlin.Function0 origin=LAMBDA + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN <> ($this:X.B) returnType:kotlin.Function0 flags: correspondingProperty: PROPERTY name:value visibility:public modality:OPEN flags:val overridden: - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT <> ($this:X) returnType:() -> kotlin.String flags: + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT <> ($this:X) returnType:kotlin.Function0 flags: $this: VALUE_PARAMETER name: type:X.B flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): () -> String' - GET_FIELD 'value: () -> String' type=() -> kotlin.String origin=null + GET_FIELD 'value: () -> String' type=kotlin.Function0 origin=null receiver: GET_VAR 'this@B: B' type=X.B origin=null FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any flags: overridden: @@ -54,9 +54,9 @@ FILE fqName: fileName:/enumEntryAsReceiver.kt overridden: FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:X) returnType:kotlin.Int flags: overridden: @@ -89,7 +89,7 @@ FILE fqName: fileName:/enumEntryAsReceiver.kt FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum) returnType:kotlin.String flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: PROPERTY name:value visibility:public modality:ABSTRACT flags:val - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT <> ($this:X) returnType:() -> kotlin.String flags: + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT <> ($this:X) returnType:kotlin.Function0 flags: correspondingProperty: PROPERTY name:value visibility:public modality:ABSTRACT flags:val $this: VALUE_PARAMETER name: type:X flags: FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any flags: @@ -100,9 +100,9 @@ FILE fqName: fileName:/enumEntryAsReceiver.kt overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:X) returnType:kotlin.Int flags: overridden: @@ -143,5 +143,5 @@ FILE fqName: fileName:/enumEntryAsReceiver.kt BLOCK_BODY RETURN type=kotlin.Nothing from='box(): String' CALL 'invoke(): R' type=kotlin.String origin=INVOKE - $this: CALL '(): () -> String' type=() -> kotlin.String origin=GET_PROPERTY + $this: CALL '(): () -> String' type=kotlin.Function0 origin=GET_PROPERTY $this: GET_ENUM 'B' type=X diff --git a/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.txt b/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.txt index 2f71d4cc5a5..7288c5888a4 100644 --- a/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.txt +++ b/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.txt @@ -47,9 +47,9 @@ FILE fqName: fileName:/enumEntryReferenceFromEnumEntryClass.kt CALL 'foo(): Unit' type=kotlin.Unit origin=null $this: GET_VAR 'this@Z: Z' type=MyEnum.Z origin=null PROPERTY name:aLambda visibility:public modality:FINAL flags:val - FIELD PROPERTY_BACKING_FIELD name:aLambda type:() -> kotlin.Unit visibility:public flags:final + FIELD PROPERTY_BACKING_FIELD name:aLambda type:kotlin.Function0 visibility:public flags:final EXPRESSION_BODY - BLOCK type=() -> kotlin.Unit origin=LAMBDA + BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY CALL '(Int): Unit' type=kotlin.Unit origin=EQ @@ -58,13 +58,13 @@ FILE fqName: fileName:/enumEntryReferenceFromEnumEntryClass.kt RETURN type=kotlin.Nothing from='(): Unit' CALL 'foo(): Unit' type=kotlin.Unit origin=null $this: GET_ENUM 'Z' type=MyEnum.Z - FUNCTION_REFERENCE '(): Unit' type=() -> kotlin.Unit origin=LAMBDA - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:MyEnum.Z) returnType:() -> kotlin.Unit flags: + FUNCTION_REFERENCE '(): Unit' type=kotlin.Function0 origin=LAMBDA + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:MyEnum.Z) returnType:kotlin.Function0 flags: correspondingProperty: PROPERTY name:aLambda visibility:public modality:FINAL flags:val $this: VALUE_PARAMETER name: type:MyEnum.Z flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): () -> Unit' - GET_FIELD 'aLambda: () -> Unit' type=() -> kotlin.Unit origin=null + GET_FIELD 'aLambda: () -> Unit' type=kotlin.Function0 origin=null receiver: GET_VAR 'this@Z: Z' type=MyEnum.Z origin=null PROPERTY name:anObject visibility:public modality:FINAL flags:val FIELD PROPERTY_BACKING_FIELD name:anObject type:kotlin.Any visibility:public flags:final @@ -120,9 +120,9 @@ FILE fqName: fileName:/enumEntryReferenceFromEnumEntryClass.kt overridden: FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:MyEnum) returnType:kotlin.Int flags: overridden: @@ -162,9 +162,9 @@ FILE fqName: fileName:/enumEntryReferenceFromEnumEntryClass.kt overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:MyEnum) returnType:kotlin.Int flags: overridden: diff --git a/compiler/testData/ir/irText/expressions/extFunInvokeAsFun.txt b/compiler/testData/ir/irText/expressions/extFunInvokeAsFun.txt index 5f5602d20a1..13c11329716 100644 --- a/compiler/testData/ir/irText/expressions/extFunInvokeAsFun.txt +++ b/compiler/testData/ir/irText/expressions/extFunInvokeAsFun.txt @@ -1,18 +1,17 @@ FILE fqName: fileName:/extFunInvokeAsFun.kt - FUN name:with1 visibility:public modality:FINAL <> (receiver:kotlin.Any?, block:kotlin.Any?.() -> kotlin.Unit) returnType:kotlin.Unit flags: + FUN name:with1 visibility:public modality:FINAL <> (receiver:kotlin.Any?, block:@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1) returnType:kotlin.Unit flags: VALUE_PARAMETER name:receiver index:0 type:kotlin.Any? flags: - VALUE_PARAMETER name:block index:1 type:kotlin.Any?.() -> kotlin.Unit flags: + VALUE_PARAMETER name:block index:1 type:@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1 flags: BLOCK_BODY RETURN type=kotlin.Nothing from='with1(Any?, Any?.() -> Unit): Unit' CALL 'invoke(P1): R' type=kotlin.Unit origin=INVOKE - $this: GET_VAR 'value-parameter block: Any?.() -> Unit' type=kotlin.Any?.() -> kotlin.Unit origin=VARIABLE_AS_FUNCTION + $this: GET_VAR 'value-parameter block: Any?.() -> Unit' type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1 origin=VARIABLE_AS_FUNCTION p1: GET_VAR 'value-parameter receiver: Any?' type=kotlin.Any? origin=null - FUN name:with2 visibility:public modality:FINAL <> (receiver:kotlin.Any?, block:kotlin.Any?.() -> kotlin.Unit) returnType:kotlin.Unit flags: + FUN name:with2 visibility:public modality:FINAL <> (receiver:kotlin.Any?, block:@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1) returnType:kotlin.Unit flags: VALUE_PARAMETER name:receiver index:0 type:kotlin.Any? flags: - VALUE_PARAMETER name:block index:1 type:kotlin.Any?.() -> kotlin.Unit flags: + VALUE_PARAMETER name:block index:1 type:@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1 flags: BLOCK_BODY RETURN type=kotlin.Nothing from='with2(Any?, Any?.() -> Unit): Unit' CALL 'invoke(P1): R' type=kotlin.Unit origin=INVOKE - $this: GET_VAR 'value-parameter block: Any?.() -> Unit' type=kotlin.Any?.() -> kotlin.Unit origin=VARIABLE_AS_FUNCTION + $this: GET_VAR 'value-parameter block: Any?.() -> Unit' type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1 origin=VARIABLE_AS_FUNCTION p1: GET_VAR 'value-parameter receiver: Any?' type=kotlin.Any? origin=null - diff --git a/compiler/testData/ir/irText/expressions/extFunSafeInvoke.txt b/compiler/testData/ir/irText/expressions/extFunSafeInvoke.txt index 0ee186f94d6..6cc825adf2b 100644 --- a/compiler/testData/ir/irText/expressions/extFunSafeInvoke.txt +++ b/compiler/testData/ir/irText/expressions/extFunSafeInvoke.txt @@ -1,7 +1,7 @@ FILE fqName: fileName:/extFunSafeInvoke.kt - FUN name:test visibility:public modality:FINAL <> (receiver:kotlin.Any?, fn:kotlin.Any.(kotlin.Int, kotlin.String) -> kotlin.Unit) returnType:kotlin.Unit? flags: + FUN name:test visibility:public modality:FINAL <> (receiver:kotlin.Any?, fn:@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function3) returnType:kotlin.Unit? flags: VALUE_PARAMETER name:receiver index:0 type:kotlin.Any? flags: - VALUE_PARAMETER name:fn index:1 type:kotlin.Any.(kotlin.Int, kotlin.String) -> kotlin.Unit flags: + VALUE_PARAMETER name:fn index:1 type:@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function3 flags: BLOCK_BODY RETURN type=kotlin.Nothing from='test(Any?, Any.(Int, String) -> Unit): Unit?' BLOCK type=kotlin.Unit? origin=SAFE_CALL @@ -16,7 +16,7 @@ FILE fqName: fileName:/extFunSafeInvoke.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CALL 'invoke(P1, P2, P3): R' type=kotlin.Unit origin=INVOKE - $this: GET_VAR 'value-parameter fn: Any.(Int, String) -> Unit' type=kotlin.Any.(kotlin.Int, kotlin.String) -> kotlin.Unit origin=VARIABLE_AS_FUNCTION + $this: GET_VAR 'value-parameter fn: Any.(Int, String) -> Unit' type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function3 origin=VARIABLE_AS_FUNCTION p1: GET_VAR 'tmp0_safe_receiver: Any?' type=kotlin.Any? origin=null p2: CONST Int type=kotlin.Int value=42 p3: CONST String type=kotlin.String value="Hello" diff --git a/compiler/testData/ir/irText/expressions/implicitCastToNonNull.txt b/compiler/testData/ir/irText/expressions/implicitCastToNonNull.txt index 6cdea2de7bf..707c8160e42 100644 --- a/compiler/testData/ir/irText/expressions/implicitCastToNonNull.txt +++ b/compiler/testData/ir/irText/expressions/implicitCastToNonNull.txt @@ -62,11 +62,11 @@ FILE fqName: fileName:/implicitCastToNonNull.kt $this: TYPE_OP type=kotlin.CharSequence origin=IMPLICIT_CAST typeOperand=kotlin.CharSequence typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE name:CharSequence modality:ABSTRACT visibility:public flags: superTypes:[kotlin.Any] GET_VAR 'value-parameter x: Any?' type=kotlin.Any? origin=null - FUN name:test5 visibility:public modality:FINAL (x:T, fn:(S) -> kotlin.Unit) returnType:kotlin.Unit flags: + FUN name:test5 visibility:public modality:FINAL (x:T, fn:kotlin.Function1) returnType:kotlin.Unit flags: TYPE_PARAMETER name:T index:0 variance: superTypes:[S?] TYPE_PARAMETER name:S index:1 variance: superTypes:[kotlin.Any?] VALUE_PARAMETER name:x index:0 type:T flags: - VALUE_PARAMETER name:fn index:1 type:(S) -> kotlin.Unit flags: + VALUE_PARAMETER name:fn index:1 type:kotlin.Function1 flags: BLOCK_BODY WHEN type=kotlin.Unit origin=null BRANCH @@ -75,6 +75,5 @@ FILE fqName: fileName:/implicitCastToNonNull.kt arg0: GET_VAR 'value-parameter x: T' type=T origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: CALL 'invoke(P1): R' type=kotlin.Unit origin=INVOKE - $this: GET_VAR 'value-parameter fn: (S) -> Unit' type=(S) -> kotlin.Unit origin=VARIABLE_AS_FUNCTION + $this: GET_VAR 'value-parameter fn: (S) -> Unit' type=kotlin.Function1 origin=VARIABLE_AS_FUNCTION p1: GET_VAR 'value-parameter x: T' type=T origin=null - diff --git a/compiler/testData/ir/irText/expressions/kt16905.txt b/compiler/testData/ir/irText/expressions/kt16905.txt index 4206a528952..d4163768312 100644 --- a/compiler/testData/ir/irText/expressions/kt16905.txt +++ b/compiler/testData/ir/irText/expressions/kt16905.txt @@ -46,7 +46,7 @@ FILE fqName: fileName:/kt16905.kt overridden: FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: - CLASS CLASS name:InnerDerived1 modality:FINAL visibility:public flags:inner superTypes:[OI /* = Outer.Inner */] + CLASS CLASS name:InnerDerived1 modality:FINAL visibility:public flags:inner superTypes:[Outer.Inner] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:Outer.InnerDerived1 flags: CONSTRUCTOR visibility:public <> ($this:Outer) returnType:Outer.InnerDerived1 flags:primary $outer: VALUE_PARAMETER name: type:Outer flags: @@ -81,9 +81,8 @@ FILE fqName: fileName:/kt16905.kt FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: TYPEALIAS typealias OI = Outer.Inner type=Outer.Inner - FUN name:test visibility:public modality:FINAL <> () returnType:OI /* = Outer.Inner */ flags: + FUN name:test visibility:public modality:FINAL <> () returnType:Outer.Inner flags: BLOCK_BODY RETURN type=kotlin.Nothing from='test(): OI /* = Outer.Inner */' CALL 'constructor Inner()' type=Outer.Inner origin=null $this: CALL 'constructor Outer()' type=Outer origin=null - diff --git a/compiler/testData/ir/irText/expressions/lambdaInCAO.txt b/compiler/testData/ir/irText/expressions/lambdaInCAO.txt index a36246cce41..1f0a1e2fc3c 100644 --- a/compiler/testData/ir/irText/expressions/lambdaInCAO.txt +++ b/compiler/testData/ir/irText/expressions/lambdaInCAO.txt @@ -1,17 +1,17 @@ FILE fqName: fileName:/lambdaInCAO.kt - FUN name:plusAssign visibility:public modality:FINAL <> ($receiver:kotlin.Any, lambda:() -> kotlin.Unit) returnType:kotlin.Unit flags: + FUN name:plusAssign visibility:public modality:FINAL <> ($receiver:kotlin.Any, lambda:kotlin.Function0) returnType:kotlin.Unit flags: $receiver: VALUE_PARAMETER name: type:kotlin.Any flags: - VALUE_PARAMETER name:lambda index:0 type:() -> kotlin.Unit flags: + VALUE_PARAMETER name:lambda index:0 type:kotlin.Function0 flags: BLOCK_BODY - FUN name:get visibility:public modality:FINAL <> ($receiver:kotlin.Any, index:() -> kotlin.Unit) returnType:kotlin.Int flags: + FUN name:get visibility:public modality:FINAL <> ($receiver:kotlin.Any, index:kotlin.Function0) returnType:kotlin.Int flags: $receiver: VALUE_PARAMETER name: type:kotlin.Any flags: - VALUE_PARAMETER name:index index:0 type:() -> kotlin.Unit flags: + VALUE_PARAMETER name:index index:0 type:kotlin.Function0 flags: BLOCK_BODY RETURN type=kotlin.Nothing from='get(() -> Unit) on Any: Int' CONST Int type=kotlin.Int value=42 - FUN name:set visibility:public modality:FINAL <> ($receiver:kotlin.Any, index:() -> kotlin.Unit, value:kotlin.Int) returnType:kotlin.Unit flags: + FUN name:set visibility:public modality:FINAL <> ($receiver:kotlin.Any, index:kotlin.Function0, value:kotlin.Int) returnType:kotlin.Unit flags: $receiver: VALUE_PARAMETER name: type:kotlin.Any flags: - VALUE_PARAMETER name:index index:0 type:() -> kotlin.Unit flags: + VALUE_PARAMETER name:index index:0 type:kotlin.Function0 flags: VALUE_PARAMETER name:value index:1 type:kotlin.Int flags: BLOCK_BODY FUN name:test1 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit flags: @@ -19,32 +19,32 @@ FILE fqName: fileName:/lambdaInCAO.kt BLOCK_BODY CALL 'plusAssign(() -> Unit) on Any: Unit' type=kotlin.Unit origin=PLUSEQ $receiver: GET_VAR 'value-parameter a: Any' type=kotlin.Any origin=PLUSEQ - lambda: BLOCK type=() -> kotlin.Unit origin=LAMBDA + lambda: BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Unit' GET_OBJECT 'Unit' type=kotlin.Unit - FUNCTION_REFERENCE '(): Unit' type=() -> kotlin.Unit origin=LAMBDA + FUNCTION_REFERENCE '(): Unit' type=kotlin.Function0 origin=LAMBDA FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit flags: VALUE_PARAMETER name:a index:0 type:kotlin.Any flags: BLOCK_BODY BLOCK type=kotlin.Unit origin=PLUSEQ VAR IR_TEMPORARY_VARIABLE name:tmp0_array type:kotlin.Any flags:val GET_VAR 'value-parameter a: Any' type=kotlin.Any origin=null - VAR IR_TEMPORARY_VARIABLE name:tmp1_index0 type:() -> kotlin.Unit flags:val - BLOCK type=() -> kotlin.Unit origin=LAMBDA + VAR IR_TEMPORARY_VARIABLE name:tmp1_index0 type:kotlin.Function0 flags:val + BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Unit' GET_OBJECT 'Unit' type=kotlin.Unit - FUNCTION_REFERENCE '(): Unit' type=() -> kotlin.Unit origin=LAMBDA + FUNCTION_REFERENCE '(): Unit' type=kotlin.Function0 origin=LAMBDA CALL 'set(() -> Unit, Int) on Any: Unit' type=kotlin.Unit origin=PLUSEQ $receiver: GET_VAR 'tmp0_array: Any' type=kotlin.Any origin=null - index: GET_VAR 'tmp1_index0: () -> Unit' type=() -> kotlin.Unit origin=null + index: GET_VAR 'tmp1_index0: () -> Unit' type=kotlin.Function0 origin=null value: CALL 'plus(Int): Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'get(() -> Unit) on Any: Int' type=kotlin.Int origin=PLUSEQ $receiver: GET_VAR 'tmp0_array: Any' type=kotlin.Any origin=null - index: GET_VAR 'tmp1_index0: () -> Unit' type=() -> kotlin.Unit origin=null + index: GET_VAR 'tmp1_index0: () -> Unit' type=kotlin.Function0 origin=null other: CONST Int type=kotlin.Int value=42 FUN name:test3 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit flags: VALUE_PARAMETER name:a index:0 type:kotlin.Any flags: @@ -54,21 +54,20 @@ FILE fqName: fileName:/lambdaInCAO.kt BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp0_array type:kotlin.Any flags:val GET_VAR 'value-parameter a: Any' type=kotlin.Any origin=null - VAR IR_TEMPORARY_VARIABLE name:tmp1_index0 type:() -> kotlin.Unit flags:val - BLOCK type=() -> kotlin.Unit origin=LAMBDA + VAR IR_TEMPORARY_VARIABLE name:tmp1_index0 type:kotlin.Function0 flags:val + BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Unit' GET_OBJECT 'Unit' type=kotlin.Unit - FUNCTION_REFERENCE '(): Unit' type=() -> kotlin.Unit origin=LAMBDA + FUNCTION_REFERENCE '(): Unit' type=kotlin.Function0 origin=LAMBDA VAR IR_TEMPORARY_VARIABLE name:tmp2 type:kotlin.Int flags:val CALL 'get(() -> Unit) on Any: Int' type=kotlin.Int origin=POSTFIX_INCR $receiver: GET_VAR 'tmp0_array: Any' type=kotlin.Any origin=null - index: GET_VAR 'tmp1_index0: () -> Unit' type=() -> kotlin.Unit origin=null + index: GET_VAR 'tmp1_index0: () -> Unit' type=kotlin.Function0 origin=null CALL 'set(() -> Unit, Int) on Any: Unit' type=kotlin.Unit origin=POSTFIX_INCR $receiver: GET_VAR 'tmp0_array: Any' type=kotlin.Any origin=null - index: GET_VAR 'tmp1_index0: () -> Unit' type=() -> kotlin.Unit origin=null + index: GET_VAR 'tmp1_index0: () -> Unit' type=kotlin.Function0 origin=null value: CALL 'inc(): Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'tmp2: Int' type=kotlin.Int origin=null GET_VAR 'tmp2: Int' type=kotlin.Int origin=null - diff --git a/compiler/testData/ir/irText/expressions/objectAsCallable.txt b/compiler/testData/ir/irText/expressions/objectAsCallable.txt index 5c7dcfb30b8..03cab6123e0 100644 --- a/compiler/testData/ir/irText/expressions/objectAsCallable.txt +++ b/compiler/testData/ir/irText/expressions/objectAsCallable.txt @@ -35,9 +35,9 @@ FILE fqName: fileName:/objectAsCallable.kt overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:En) returnType:kotlin.Int flags: overridden: diff --git a/compiler/testData/ir/irText/expressions/objectReference.txt b/compiler/testData/ir/irText/expressions/objectReference.txt index e71fdbfec11..eafdc21ef6a 100644 --- a/compiler/testData/ir/irText/expressions/objectReference.txt +++ b/compiler/testData/ir/irText/expressions/objectReference.txt @@ -85,9 +85,9 @@ FILE fqName: fileName:/objectReference.kt FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: PROPERTY name:aLambda visibility:public modality:FINAL flags:val - FIELD PROPERTY_BACKING_FIELD name:aLambda type:() -> kotlin.Unit visibility:public flags:final + FIELD PROPERTY_BACKING_FIELD name:aLambda type:kotlin.Function0 visibility:public flags:final EXPRESSION_BODY - BLOCK type=() -> kotlin.Unit origin=LAMBDA + BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY CALL '(Int): Unit' type=kotlin.Unit origin=EQ @@ -101,13 +101,13 @@ FILE fqName: fileName:/objectReference.kt RETURN type=kotlin.Nothing from='(): Unit' CALL 'foo(): Unit' type=kotlin.Unit origin=null $this: GET_OBJECT 'Z' type=Z - FUNCTION_REFERENCE '(): Unit' type=() -> kotlin.Unit origin=LAMBDA - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:Z) returnType:() -> kotlin.Unit flags: + FUNCTION_REFERENCE '(): Unit' type=kotlin.Function0 origin=LAMBDA + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:Z) returnType:kotlin.Function0 flags: correspondingProperty: PROPERTY name:aLambda visibility:public modality:FINAL flags:val $this: VALUE_PARAMETER name: type:Z flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): () -> Unit' - GET_FIELD 'aLambda: () -> Unit' type=() -> kotlin.Unit origin=null + GET_FIELD 'aLambda: () -> Unit' type=kotlin.Function0 origin=null receiver: GET_VAR 'this@Z: Z' type=Z origin=null PROPERTY name:anObject visibility:public modality:FINAL flags:val FIELD PROPERTY_BACKING_FIELD name:anObject type:kotlin.Any visibility:public flags:final diff --git a/compiler/testData/ir/irText/expressions/objectReferenceInClosureInSuperConstructorCall.txt b/compiler/testData/ir/irText/expressions/objectReferenceInClosureInSuperConstructorCall.txt index dc9bca3fb13..20aa7098ff6 100644 --- a/compiler/testData/ir/irText/expressions/objectReferenceInClosureInSuperConstructorCall.txt +++ b/compiler/testData/ir/irText/expressions/objectReferenceInClosureInSuperConstructorCall.txt @@ -1,21 +1,21 @@ FILE fqName: fileName:/objectReferenceInClosureInSuperConstructorCall.kt CLASS CLASS name:Base modality:ABSTRACT visibility:public flags: superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:Base flags: - CONSTRUCTOR visibility:public <> (lambda:() -> kotlin.Any) returnType:Base flags:primary - VALUE_PARAMETER name:lambda index:0 type:() -> kotlin.Any flags: + CONSTRUCTOR visibility:public <> (lambda:kotlin.Function0) returnType:Base flags:primary + VALUE_PARAMETER name:lambda index:0 type:kotlin.Function0 flags: BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='Base' PROPERTY name:lambda visibility:public modality:FINAL flags:val - FIELD PROPERTY_BACKING_FIELD name:lambda type:() -> kotlin.Any visibility:public flags:final + FIELD PROPERTY_BACKING_FIELD name:lambda type:kotlin.Function0 visibility:public flags:final EXPRESSION_BODY - GET_VAR 'value-parameter lambda: () -> Any' type=() -> kotlin.Any origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:Base) returnType:() -> kotlin.Any flags: + GET_VAR 'value-parameter lambda: () -> Any' type=kotlin.Function0 origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:Base) returnType:kotlin.Function0 flags: correspondingProperty: PROPERTY name:lambda visibility:public modality:FINAL flags:val $this: VALUE_PARAMETER name: type:Base flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): () -> Any' - GET_FIELD 'lambda: () -> Any' type=() -> kotlin.Any origin=null + GET_FIELD 'lambda: () -> Any' type=kotlin.Function0 origin=null receiver: GET_VAR 'this@Base: Base' type=Base origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: overridden: @@ -35,21 +35,21 @@ FILE fqName: fileName:/objectReferenceInClosureInSuperConstructorCall.kt CONSTRUCTOR visibility:private <> () returnType:Test flags:primary BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Base(() -> Any)' - lambda: BLOCK type=() -> Test origin=LAMBDA + lambda: BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:Test flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Test' GET_OBJECT 'Test' type=Test - FUNCTION_REFERENCE '(): Test' type=() -> Test origin=LAMBDA + FUNCTION_REFERENCE '(): Test' type=kotlin.Function0 origin=LAMBDA INSTANCE_INITIALIZER_CALL classDescriptor='Test' PROPERTY FAKE_OVERRIDE name:lambda visibility:public modality:FINAL flags:val - FIELD FAKE_OVERRIDE name:lambda type:() -> kotlin.Any visibility:public flags:final + FIELD FAKE_OVERRIDE name:lambda type:kotlin.Function0 visibility:public flags:final overridden: - FIELD PROPERTY_BACKING_FIELD name:lambda type:() -> kotlin.Any visibility:public flags:final - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:Base) returnType:() -> kotlin.Any flags: + FIELD PROPERTY_BACKING_FIELD name:lambda type:kotlin.Function0 visibility:public flags:final + FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:Base) returnType:kotlin.Function0 flags: correspondingProperty: PROPERTY FAKE_OVERRIDE name:lambda visibility:public modality:FINAL flags:val overridden: - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:Base) returnType:() -> kotlin.Any flags: + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:Base) returnType:kotlin.Function0 flags: $this: VALUE_PARAMETER name: type:Base flags: FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: overridden: diff --git a/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.txt b/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.txt index a53084519a2..08afdf5dabd 100644 --- a/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.txt +++ b/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.txt @@ -32,10 +32,9 @@ FILE fqName: fileName:/specializedTypeAliasConstructorCall.kt FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: TYPEALIAS typealias IntAlias = Cell type=Cell - FUN name:test visibility:public modality:FINAL <> () returnType:IntAlias /* = Cell */ flags: + FUN name:test visibility:public modality:FINAL <> () returnType:Cell flags: BLOCK_BODY RETURN type=kotlin.Nothing from='test(): IntAlias /* = Cell */' CALL 'constructor Cell(T)' type=Cell origin=null : kotlin.Int value: CONST Int type=kotlin.Int value=42 - diff --git a/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.txt b/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.txt index 0e5ad1db09d..b20abf7f4bf 100644 --- a/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.txt +++ b/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.txt @@ -19,8 +19,8 @@ FILE fqName: fileName:/thisOfGenericOuterClass.kt GET_FIELD 'x: T' type=T origin=null receiver: GET_VAR 'this@Outer: Outer' type=Outer origin=null CLASS CLASS name:Inner modality:OPEN visibility:public flags:inner superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:Outer.Inner flags: - CONSTRUCTOR visibility:public <> ($this:Outer, y:kotlin.Int) returnType:Outer.Inner flags:primary + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:Outer.Inner flags: + CONSTRUCTOR visibility:public <> ($this:Outer, y:kotlin.Int) returnType:Outer.Inner flags:primary $outer: VALUE_PARAMETER name: type:Outer flags: VALUE_PARAMETER name:y index:0 type:kotlin.Int flags: BLOCK_BODY @@ -30,13 +30,13 @@ FILE fqName: fileName:/thisOfGenericOuterClass.kt FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:public flags:final EXPRESSION_BODY GET_VAR 'value-parameter y: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:Outer.Inner) returnType:kotlin.Int flags: + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:Outer.Inner) returnType:kotlin.Int flags: correspondingProperty: PROPERTY name:y visibility:public modality:FINAL flags:val - $this: VALUE_PARAMETER name: type:Outer.Inner flags: + $this: VALUE_PARAMETER name: type:Outer.Inner flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_FIELD 'y: Int' type=kotlin.Int origin=null - receiver: GET_VAR 'this@Inner: Inner' type=Outer.Inner origin=null + receiver: GET_VAR 'this@Inner: Inner' type=Outer.Inner origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: @@ -63,12 +63,12 @@ FILE fqName: fileName:/thisOfGenericOuterClass.kt overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: - FUN name:test visibility:public modality:FINAL <> ($receiver:Outer) returnType:Outer.Inner flags: + FUN name:test visibility:public modality:FINAL <> ($receiver:Outer) returnType:Outer.Inner flags: $receiver: VALUE_PARAMETER name: type:Outer flags: BLOCK_BODY RETURN type=kotlin.Nothing from='test() on Outer: Outer.Inner' BLOCK type=test. origin=OBJECT_LITERAL - CLASS CLASS name: modality:FINAL visibility:local flags: superTypes:[Outer.Inner] + CLASS CLASS name: modality:FINAL visibility:local flags: superTypes:[Outer.Inner] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:test. flags: CONSTRUCTOR visibility:public <> () returnType:test. flags:primary BLOCK_BODY @@ -92,11 +92,11 @@ FILE fqName: fileName:/thisOfGenericOuterClass.kt GET_FIELD 'xx: Int' type=kotlin.Int origin=null receiver: GET_VAR 'this@: ' type=test. origin=null PROPERTY FAKE_OVERRIDE name:y visibility:public modality:FINAL flags:val - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:Outer.Inner) returnType:kotlin.Int flags: + FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:Outer.Inner) returnType:kotlin.Int flags: correspondingProperty: PROPERTY FAKE_OVERRIDE name:y visibility:public modality:FINAL flags:val overridden: - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:Outer.Inner) returnType:kotlin.Int flags: - $this: VALUE_PARAMETER name: type:Outer.Inner flags: + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:Outer.Inner) returnType:kotlin.Int flags: + $this: VALUE_PARAMETER name: type:Outer.Inner flags: FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: overridden: FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: diff --git a/compiler/testData/ir/irText/expressions/values.txt b/compiler/testData/ir/irText/expressions/values.txt index d55dcd54705..6f13ad4841c 100644 --- a/compiler/testData/ir/irText/expressions/values.txt +++ b/compiler/testData/ir/irText/expressions/values.txt @@ -16,9 +16,9 @@ FILE fqName: fileName:/values.kt overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:Enum) returnType:kotlin.Int flags: overridden: diff --git a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt index cfad2c9c14e..467d17c9d5f 100644 --- a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt +++ b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt @@ -1,43 +1,43 @@ FILE fqName: fileName:/variableAsFunctionCall.kt - FUN name:k visibility:public modality:FINAL <> ($receiver:kotlin.String) returnType:() -> kotlin.String flags: + FUN name:k visibility:public modality:FINAL <> ($receiver:kotlin.String) returnType:kotlin.Function0 flags: $receiver: VALUE_PARAMETER name: type:kotlin.String flags: BLOCK_BODY RETURN type=kotlin.Nothing from='k() on String: () -> String' - BLOCK type=() -> kotlin.String origin=LAMBDA + BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): String' GET_VAR 'this@k: String' type=kotlin.String origin=null - FUNCTION_REFERENCE '(): String' type=() -> kotlin.String origin=LAMBDA - FUN name:test1 visibility:public modality:FINAL <> (f:() -> kotlin.Unit) returnType:kotlin.Unit flags: - VALUE_PARAMETER name:f index:0 type:() -> kotlin.Unit flags: + FUNCTION_REFERENCE '(): String' type=kotlin.Function0 origin=LAMBDA + FUN name:test1 visibility:public modality:FINAL <> (f:kotlin.Function0) returnType:kotlin.Unit flags: + VALUE_PARAMETER name:f index:0 type:kotlin.Function0 flags: BLOCK_BODY RETURN type=kotlin.Nothing from='test1(() -> Unit): Unit' CALL 'invoke(): R' type=kotlin.Unit origin=INVOKE - $this: GET_VAR 'value-parameter f: () -> Unit' type=() -> kotlin.Unit origin=VARIABLE_AS_FUNCTION - FUN name:test2 visibility:public modality:FINAL <> (f:kotlin.String.() -> kotlin.Unit) returnType:kotlin.Unit flags: - VALUE_PARAMETER name:f index:0 type:kotlin.String.() -> kotlin.Unit flags: + $this: GET_VAR 'value-parameter f: () -> Unit' type=kotlin.Function0 origin=VARIABLE_AS_FUNCTION + FUN name:test2 visibility:public modality:FINAL <> (f:@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1) returnType:kotlin.Unit flags: + VALUE_PARAMETER name:f index:0 type:@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1 flags: BLOCK_BODY RETURN type=kotlin.Nothing from='test2(String.() -> Unit): Unit' CALL 'invoke(P1): R' type=kotlin.Unit origin=INVOKE - $this: GET_VAR 'value-parameter f: String.() -> Unit' type=kotlin.String.() -> kotlin.Unit origin=VARIABLE_AS_FUNCTION + $this: GET_VAR 'value-parameter f: String.() -> Unit' type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1 origin=VARIABLE_AS_FUNCTION p1: CONST String type=kotlin.String value="hello" FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.String flags: BLOCK_BODY RETURN type=kotlin.Nothing from='test3(): String' CALL 'invoke(): R' type=kotlin.String origin=null - $this: CALL 'k() on String: () -> String' type=() -> kotlin.String origin=null + $this: CALL 'k() on String: () -> String' type=kotlin.Function0 origin=null $receiver: CONST String type=kotlin.String value="hello" FUN name:test4 visibility:public modality:FINAL <> (ns:kotlin.String?) returnType:kotlin.String? flags: VALUE_PARAMETER name:ns index:0 type:kotlin.String? flags: BLOCK_BODY RETURN type=kotlin.Nothing from='test4(String?): String?' BLOCK type=kotlin.String? origin=SAFE_CALL - VAR IR_TEMPORARY_VARIABLE name:tmp1_safe_receiver type:(() -> kotlin.String)? flags:val - BLOCK type=(() -> kotlin.String)? origin=SAFE_CALL + VAR IR_TEMPORARY_VARIABLE name:tmp1_safe_receiver type:kotlin.Function0? flags:val + BLOCK type=kotlin.Function0? origin=SAFE_CALL VAR IR_TEMPORARY_VARIABLE name:tmp0_safe_receiver type:kotlin.String? flags:val GET_VAR 'value-parameter ns: String?' type=kotlin.String? origin=null - WHEN type=(() -> kotlin.String)? origin=null + WHEN type=kotlin.Function0? origin=null BRANCH if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null @@ -45,16 +45,15 @@ FILE fqName: fileName:/variableAsFunctionCall.kt then: CONST Null type=kotlin.Nothing? value=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'k() on String: () -> String' type=() -> kotlin.String origin=null + then: CALL 'k() on String: () -> String' type=kotlin.Function0 origin=null $receiver: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null WHEN type=kotlin.String? origin=null BRANCH if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'tmp1_safe_receiver: (() -> String)?' type=(() -> kotlin.String)? origin=null + arg0: GET_VAR 'tmp1_safe_receiver: (() -> String)?' type=kotlin.Function0? 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 'invoke(): R' type=kotlin.String origin=null - $this: GET_VAR 'tmp1_safe_receiver: (() -> String)?' type=(() -> kotlin.String)? origin=null - + $this: GET_VAR 'tmp1_safe_receiver: (() -> String)?' type=kotlin.Function0? origin=null diff --git a/compiler/testData/ir/irText/expressions/variableAsFunctionCallWithGenerics.txt b/compiler/testData/ir/irText/expressions/variableAsFunctionCallWithGenerics.txt index 17e19ed7456..0d74f642318 100644 --- a/compiler/testData/ir/irText/expressions/variableAsFunctionCallWithGenerics.txt +++ b/compiler/testData/ir/irText/expressions/variableAsFunctionCallWithGenerics.txt @@ -1,42 +1,42 @@ FILE fqName: fileName:/variableAsFunctionCallWithGenerics.kt PROPERTY name:gk visibility:public modality:FINAL flags:val - FUN name: visibility:public modality:FINAL ($receiver:T) returnType:() -> T flags: + FUN name: visibility:public modality:FINAL ($receiver:T) returnType:kotlin.Function0 flags: correspondingProperty: PROPERTY name:gk visibility:public modality:FINAL flags:val TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.CharSequence] $receiver: VALUE_PARAMETER name: type:T flags: BLOCK_BODY RETURN type=kotlin.Nothing from='() on T: () -> T' - BLOCK type=() -> T origin=LAMBDA + BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:T flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): T' GET_VAR 'this@gk: T' type=T origin=null - FUNCTION_REFERENCE '(): T' type=() -> T origin=LAMBDA + FUNCTION_REFERENCE '(): T' type=kotlin.Function0 origin=LAMBDA FUN name:testGeneric1 visibility:public modality:FINAL <> (x:kotlin.String) returnType:kotlin.String flags: VALUE_PARAMETER name:x index:0 type:kotlin.String flags: BLOCK_BODY RETURN type=kotlin.Nothing from='testGeneric1(String): String' CALL 'invoke(): R' type=kotlin.String origin=INVOKE - $this: CALL '() on T: () -> T' type=() -> kotlin.String origin=GET_PROPERTY + $this: CALL '() on T: () -> T' type=kotlin.Function0 origin=GET_PROPERTY <`0>: kotlin.String $receiver: GET_VAR 'value-parameter x: String' type=kotlin.String origin=null PROPERTY name:kt26531Val visibility:public modality:FINAL flags:val - FUN name: visibility:public modality:FINAL ($receiver:T) returnType:() -> T flags: + FUN name: visibility:public modality:FINAL ($receiver:T) returnType:kotlin.Function0 flags: correspondingProperty: PROPERTY name:kt26531Val visibility:public modality:FINAL flags:val TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] $receiver: VALUE_PARAMETER name: type:T flags: BLOCK_BODY RETURN type=kotlin.Nothing from='() on T: () -> T' - BLOCK type=() -> T origin=ANONYMOUS_FUNCTION + BLOCK type=kotlin.Function0 origin=ANONYMOUS_FUNCTION FUN name: visibility:local modality:FINAL <> () returnType:T flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): T' GET_VAR 'this@kt26531Val: T' type=T origin=null - FUNCTION_REFERENCE '(): T' type=() -> T origin=ANONYMOUS_FUNCTION + FUNCTION_REFERENCE '(): T' type=kotlin.Function0 origin=ANONYMOUS_FUNCTION FUN name:kt26531 visibility:public modality:FINAL <> () returnType:kotlin.Int flags: BLOCK_BODY RETURN type=kotlin.Nothing from='kt26531(): Int' CALL 'invoke(): R' type=kotlin.Int origin=INVOKE - $this: CALL '() on T: () -> T' type=() -> kotlin.Int origin=GET_PROPERTY + $this: CALL '() on T: () -> T' type=kotlin.Function0 origin=GET_PROPERTY <`0>: kotlin.Int $receiver: CONST Int type=kotlin.Int value=7 diff --git a/compiler/testData/ir/irText/lambdas/anonymousFunction.txt b/compiler/testData/ir/irText/lambdas/anonymousFunction.txt index 1d7ffb2bef4..5ab45351d4d 100644 --- a/compiler/testData/ir/irText/lambdas/anonymousFunction.txt +++ b/compiler/testData/ir/irText/lambdas/anonymousFunction.txt @@ -1,15 +1,14 @@ FILE fqName: fileName:/anonymousFunction.kt PROPERTY name:anonymous visibility:public modality:FINAL flags:val - FIELD PROPERTY_BACKING_FIELD name:anonymous type:() -> kotlin.Unit visibility:public flags:final,static + FIELD PROPERTY_BACKING_FIELD name:anonymous type:kotlin.Function0 visibility:public flags:final,static EXPRESSION_BODY - BLOCK type=() -> kotlin.Unit origin=ANONYMOUS_FUNCTION + BLOCK type=kotlin.Function0 origin=ANONYMOUS_FUNCTION FUN name: visibility:local modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY CALL 'println(): Unit' type=kotlin.Unit origin=null - FUNCTION_REFERENCE '(): Unit' type=() -> kotlin.Unit origin=ANONYMOUS_FUNCTION - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:() -> kotlin.Unit flags: + FUNCTION_REFERENCE '(): Unit' type=kotlin.Function0 origin=ANONYMOUS_FUNCTION + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function0 flags: correspondingProperty: PROPERTY name:anonymous visibility:public modality:FINAL flags:val BLOCK_BODY RETURN type=kotlin.Nothing from='(): () -> Unit' - GET_FIELD 'anonymous: () -> Unit' type=() -> kotlin.Unit origin=null - + GET_FIELD 'anonymous: () -> Unit' type=kotlin.Function0 origin=null diff --git a/compiler/testData/ir/irText/lambdas/destructuringInLambda.txt b/compiler/testData/ir/irText/lambdas/destructuringInLambda.txt index 1a3609260d3..4bd567d7a84 100644 --- a/compiler/testData/ir/irText/lambdas/destructuringInLambda.txt +++ b/compiler/testData/ir/irText/lambdas/destructuringInLambda.txt @@ -140,9 +140,9 @@ FILE fqName: fileName:/destructuringInLambda.kt RETURN type=kotlin.Nothing from='equals(Any?): Boolean' CONST Boolean type=kotlin.Boolean value=true PROPERTY name:fn visibility:public modality:FINAL flags:var - FIELD PROPERTY_BACKING_FIELD name:fn type:(A) -> kotlin.Int visibility:public flags:static + FIELD PROPERTY_BACKING_FIELD name:fn type:kotlin.Function1 visibility:public flags:static EXPRESSION_BODY - BLOCK type=(A) -> kotlin.Int origin=LAMBDA + BLOCK type=kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (:A) returnType:kotlin.Int flags: VALUE_PARAMETER name: index:0 type:A flags: BLOCK_BODY @@ -153,16 +153,15 @@ FILE fqName: fileName:/destructuringInLambda.kt CALL 'plus(Int): Int' type=kotlin.Int origin=PLUS $this: CONST Int type=kotlin.Int value=42 other: GET_VAR 'y: Int' type=kotlin.Int origin=null - FUNCTION_REFERENCE '(A): Int' type=(A) -> kotlin.Int origin=LAMBDA - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:(A) -> kotlin.Int flags: + FUNCTION_REFERENCE '(A): Int' type=kotlin.Function1 origin=LAMBDA + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function1 flags: correspondingProperty: PROPERTY name:fn visibility:public modality:FINAL flags:var BLOCK_BODY RETURN type=kotlin.Nothing from='(): (A) -> Int' - GET_FIELD 'fn: (A) -> Int' type=(A) -> kotlin.Int origin=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:(A) -> kotlin.Int) returnType:kotlin.Unit flags: + GET_FIELD 'fn: (A) -> Int' type=kotlin.Function1 origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:kotlin.Function1) returnType:kotlin.Unit flags: correspondingProperty: PROPERTY name:fn visibility:public modality:FINAL flags:var - VALUE_PARAMETER name: index:0 type:(A) -> kotlin.Int flags: + VALUE_PARAMETER name: index:0 type:kotlin.Function1 flags: BLOCK_BODY SET_FIELD 'fn: (A) -> Int' type=kotlin.Unit origin=null - value: GET_VAR 'value-parameter : (A) -> Int' type=(A) -> kotlin.Int origin=null - + value: GET_VAR 'value-parameter : (A) -> Int' type=kotlin.Function1 origin=null diff --git a/compiler/testData/ir/irText/lambdas/extensionLambda.txt b/compiler/testData/ir/irText/lambdas/extensionLambda.txt index bf0c0a95824..4981ec504e2 100644 --- a/compiler/testData/ir/irText/lambdas/extensionLambda.txt +++ b/compiler/testData/ir/irText/lambdas/extensionLambda.txt @@ -6,12 +6,11 @@ FILE fqName: fileName:/extensionLambda.kt : kotlin.String : kotlin.Int $receiver: CONST String type=kotlin.String value="42" - block: BLOCK type=kotlin.String.() -> kotlin.Int origin=LAMBDA + block: BLOCK type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:kotlin.String) returnType:kotlin.Int flags: $receiver: VALUE_PARAMETER name: type:kotlin.String flags: BLOCK_BODY RETURN type=kotlin.Nothing from='() on String: Int' CALL '(): Int' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR 'this@: String' type=kotlin.String origin=null - FUNCTION_REFERENCE '() on String: Int' type=kotlin.String.() -> kotlin.Int origin=LAMBDA - + FUNCTION_REFERENCE '() on String: Int' type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1 origin=LAMBDA diff --git a/compiler/testData/ir/irText/lambdas/justLambda.txt b/compiler/testData/ir/irText/lambdas/justLambda.txt index f94f339de35..910ebb219e6 100644 --- a/compiler/testData/ir/irText/lambdas/justLambda.txt +++ b/compiler/testData/ir/irText/lambdas/justLambda.txt @@ -1,30 +1,29 @@ FILE fqName: fileName:/justLambda.kt PROPERTY name:test1 visibility:public modality:FINAL flags:val - FIELD PROPERTY_BACKING_FIELD name:test1 type:() -> kotlin.Int visibility:public flags:final,static + FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Function0 visibility:public flags:final,static EXPRESSION_BODY - BLOCK type=() -> kotlin.Int origin=LAMBDA + BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Int flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value=42 - FUNCTION_REFERENCE '(): Int' type=() -> kotlin.Int origin=LAMBDA - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:() -> kotlin.Int flags: + FUNCTION_REFERENCE '(): Int' type=kotlin.Function0 origin=LAMBDA + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function0 flags: correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL flags:val BLOCK_BODY RETURN type=kotlin.Nothing from='(): () -> Int' - GET_FIELD 'test1: () -> Int' type=() -> kotlin.Int origin=null + GET_FIELD 'test1: () -> Int' type=kotlin.Function0 origin=null PROPERTY name:test2 visibility:public modality:FINAL flags:val - FIELD PROPERTY_BACKING_FIELD name:test2 type:() -> kotlin.Unit visibility:public flags:final,static + FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Function0 visibility:public flags:final,static EXPRESSION_BODY - BLOCK type=() -> kotlin.Unit origin=LAMBDA + BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Unit' GET_OBJECT 'Unit' type=kotlin.Unit - FUNCTION_REFERENCE '(): Unit' type=() -> kotlin.Unit origin=LAMBDA - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:() -> kotlin.Unit flags: + FUNCTION_REFERENCE '(): Unit' type=kotlin.Function0 origin=LAMBDA + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function0 flags: correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL flags:val BLOCK_BODY RETURN type=kotlin.Nothing from='(): () -> Unit' - GET_FIELD 'test2: () -> Unit' type=() -> kotlin.Unit origin=null - + GET_FIELD 'test2: () -> Unit' type=kotlin.Function0 origin=null diff --git a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt index ad029fd4730..8fdb7504689 100644 --- a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt +++ b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt @@ -91,7 +91,7 @@ FILE fqName: fileName:/multipleImplicitReceivers.kt : A : kotlin.Int receiver: GET_OBJECT 'A' type=A - block: BLOCK type=A.() -> kotlin.Int origin=LAMBDA + block: BLOCK type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:A) returnType:kotlin.Int flags: $receiver: VALUE_PARAMETER name: type:A flags: BLOCK_BODY @@ -100,7 +100,7 @@ FILE fqName: fileName:/multipleImplicitReceivers.kt : IFoo : kotlin.Int receiver: GET_VAR 'value-parameter fooImpl: IFoo' type=IFoo origin=null - block: BLOCK type=IFoo.() -> kotlin.Int origin=LAMBDA + block: BLOCK type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:IFoo) returnType:kotlin.Int flags: $receiver: VALUE_PARAMETER name: type:IFoo flags: BLOCK_BODY @@ -109,7 +109,7 @@ FILE fqName: fileName:/multipleImplicitReceivers.kt : IInvoke : kotlin.Int receiver: GET_VAR 'value-parameter invokeImpl: IInvoke' type=IInvoke origin=null - block: BLOCK type=IInvoke.() -> kotlin.Int origin=LAMBDA + block: BLOCK type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:IInvoke) returnType:kotlin.Int flags: $receiver: VALUE_PARAMETER name: type:IInvoke flags: BLOCK_BODY @@ -119,7 +119,6 @@ FILE fqName: fileName:/multipleImplicitReceivers.kt $receiver: CALL '() on A: B' type=B origin=GET_PROPERTY $this: GET_VAR 'this@: IFoo' type=IFoo origin=null $receiver: GET_VAR 'this@: A' type=A origin=null - FUNCTION_REFERENCE '() on IInvoke: Int' type=IInvoke.() -> kotlin.Int origin=LAMBDA - FUNCTION_REFERENCE '() on IFoo: Int' type=IFoo.() -> kotlin.Int origin=LAMBDA - FUNCTION_REFERENCE '() on A: Int' type=A.() -> kotlin.Int origin=LAMBDA - + FUNCTION_REFERENCE '() on IInvoke: Int' type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1 origin=LAMBDA + FUNCTION_REFERENCE '() on IFoo: Int' type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1 origin=LAMBDA + FUNCTION_REFERENCE '() on A: Int' type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1 origin=LAMBDA diff --git a/compiler/testData/ir/irText/lambdas/nonLocalReturn.txt b/compiler/testData/ir/irText/lambdas/nonLocalReturn.txt index b8450ca4ee3..c819557a8bd 100644 --- a/compiler/testData/ir/irText/lambdas/nonLocalReturn.txt +++ b/compiler/testData/ir/irText/lambdas/nonLocalReturn.txt @@ -3,56 +3,56 @@ FILE fqName: fileName:/nonLocalReturn.kt BLOCK_BODY CALL 'run(() -> R): R' type=kotlin.Nothing origin=null : kotlin.Nothing - block: BLOCK type=() -> kotlin.Nothing origin=LAMBDA + block: BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Nothing flags: BLOCK_BODY RETURN type=kotlin.Nothing from='test0(): Unit' GET_OBJECT 'Unit' type=kotlin.Unit - FUNCTION_REFERENCE '(): Nothing' type=() -> kotlin.Nothing origin=LAMBDA + FUNCTION_REFERENCE '(): Nothing' type=kotlin.Function0 origin=LAMBDA FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY CALL 'run(() -> R): R' type=kotlin.Unit origin=null : kotlin.Unit - block: BLOCK type=() -> kotlin.Unit origin=LAMBDA + block: BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Unit' GET_OBJECT 'Unit' type=kotlin.Unit - FUNCTION_REFERENCE '(): Unit' type=() -> kotlin.Unit origin=LAMBDA + FUNCTION_REFERENCE '(): Unit' type=kotlin.Function0 origin=LAMBDA FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY CALL 'run(() -> R): R' type=kotlin.Unit origin=null : kotlin.Unit - block: BLOCK type=() -> kotlin.Unit origin=LAMBDA + block: BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Unit' GET_OBJECT 'Unit' type=kotlin.Unit - FUNCTION_REFERENCE '(): Unit' type=() -> kotlin.Unit origin=LAMBDA + FUNCTION_REFERENCE '(): Unit' type=kotlin.Function0 origin=LAMBDA FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY CALL 'run(() -> R): R' type=kotlin.Unit origin=null : kotlin.Unit - block: BLOCK type=() -> kotlin.Unit origin=LAMBDA + block: BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Unit' CALL 'run(() -> R): R' type=kotlin.Nothing origin=null : kotlin.Nothing - block: BLOCK type=() -> kotlin.Nothing origin=LAMBDA + block: BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Nothing flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Unit' GET_OBJECT 'Unit' type=kotlin.Unit - FUNCTION_REFERENCE '(): Nothing' type=() -> kotlin.Nothing origin=LAMBDA - FUNCTION_REFERENCE '(): Unit' type=() -> kotlin.Unit origin=LAMBDA + FUNCTION_REFERENCE '(): Nothing' type=kotlin.Function0 origin=LAMBDA + FUNCTION_REFERENCE '(): Unit' type=kotlin.Function0 origin=LAMBDA FUN name:testLrmFoo1 visibility:public modality:FINAL <> (ints:kotlin.collections.List) returnType:kotlin.Unit flags: VALUE_PARAMETER name:ints index:0 type:kotlin.collections.List flags: BLOCK_BODY CALL 'forEach((T) -> Unit) on Iterable: Unit' type=kotlin.Unit origin=null : kotlin.Int $receiver: GET_VAR 'value-parameter ints: List' type=kotlin.collections.List origin=null - action: BLOCK type=(kotlin.Int) -> kotlin.Unit origin=LAMBDA + action: BLOCK type=kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Unit flags: VALUE_PARAMETER name:it index:0 type:kotlin.Int flags: BLOCK_BODY @@ -66,14 +66,14 @@ FILE fqName: fileName:/nonLocalReturn.kt RETURN type=kotlin.Nothing from='(Int): Unit' CALL 'print(Int): Unit' type=kotlin.Unit origin=null message: GET_VAR 'value-parameter it: Int' type=kotlin.Int origin=null - FUNCTION_REFERENCE '(Int): Unit' type=(kotlin.Int) -> kotlin.Unit origin=LAMBDA + FUNCTION_REFERENCE '(Int): Unit' type=kotlin.Function1 origin=LAMBDA FUN name:testLrmFoo2 visibility:public modality:FINAL <> (ints:kotlin.collections.List) returnType:kotlin.Unit flags: VALUE_PARAMETER name:ints index:0 type:kotlin.collections.List flags: BLOCK_BODY CALL 'forEach((T) -> Unit) on Iterable: Unit' type=kotlin.Unit origin=null : kotlin.Int $receiver: GET_VAR 'value-parameter ints: List' type=kotlin.collections.List origin=null - action: BLOCK type=(kotlin.Int) -> kotlin.Unit origin=LAMBDA + action: BLOCK type=kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Unit flags: VALUE_PARAMETER name:it index:0 type:kotlin.Int flags: BLOCK_BODY @@ -87,5 +87,4 @@ FILE fqName: fileName:/nonLocalReturn.kt RETURN type=kotlin.Nothing from='(Int): Unit' CALL 'print(Int): Unit' type=kotlin.Unit origin=null message: GET_VAR 'value-parameter it: Int' type=kotlin.Int origin=null - FUNCTION_REFERENCE '(Int): Unit' type=(kotlin.Int) -> kotlin.Unit origin=LAMBDA - + FUNCTION_REFERENCE '(Int): Unit' type=kotlin.Function1 origin=LAMBDA diff --git a/compiler/testData/ir/irText/lambdas/samAdapter.txt b/compiler/testData/ir/irText/lambdas/samAdapter.txt index 029b29cdd98..4820cce3a90 100644 --- a/compiler/testData/ir/irText/lambdas/samAdapter.txt +++ b/compiler/testData/ir/irText/lambdas/samAdapter.txt @@ -3,12 +3,12 @@ FILE fqName: fileName:/samAdapter.kt BLOCK_BODY VAR name:hello type:java.lang.Runnable flags:val CALL 'Runnable(() -> Unit): Runnable' type=java.lang.Runnable origin=null - function: BLOCK type=() -> kotlin.Unit origin=LAMBDA + function: BLOCK type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): Unit' CALL 'println(Any?): Unit' type=kotlin.Unit origin=null message: CONST String type=kotlin.String value="Hello, world!" - FUNCTION_REFERENCE '(): Unit' type=() -> kotlin.Unit origin=LAMBDA + FUNCTION_REFERENCE '(): Unit' type=kotlin.Function0 origin=LAMBDA CALL 'run(): Unit' type=kotlin.Unit origin=null $this: GET_VAR 'hello: Runnable' type=java.lang.Runnable origin=null diff --git a/compiler/testData/ir/irText/regressions/integerCoercionToT.txt b/compiler/testData/ir/irText/regressions/integerCoercionToT.txt index 6fe6de82fd1..6c0e83900c9 100644 --- a/compiler/testData/ir/irText/regressions/integerCoercionToT.txt +++ b/compiler/testData/ir/irText/regressions/integerCoercionToT.txt @@ -86,13 +86,12 @@ FILE fqName: fileName:/integerCoercionToT.kt overridden: FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: - FUN name:foo visibility:public modality:FINAL <> (value:IdType, cv:CInt32Var /* = CInt32VarX */) returnType:kotlin.Unit flags: + FUN name:foo visibility:public modality:FINAL <> (value:IdType, cv:CInt32VarX) returnType:kotlin.Unit flags: VALUE_PARAMETER name:value index:0 type:IdType flags: - VALUE_PARAMETER name:cv index:1 type:CInt32Var /* = CInt32VarX */ flags: + VALUE_PARAMETER name:cv index:1 type:CInt32VarX flags: BLOCK_BODY CALL '(T_INT) on CInt32VarX: Unit' type=kotlin.Unit origin=EQ <`0>: kotlin.Int - $receiver: GET_VAR 'value-parameter cv: CInt32Var /* = CInt32VarX */' type=CInt32Var /* = CInt32VarX */ origin=null + $receiver: GET_VAR 'value-parameter cv: CInt32Var /* = CInt32VarX */' type=CInt32VarX origin=null value: CALL '(): Int' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR 'value-parameter value: IdType' type=IdType origin=null - diff --git a/compiler/testData/ir/irText/regressions/newInference/fixationOrder1.txt b/compiler/testData/ir/irText/regressions/newInference/fixationOrder1.txt index 1f23119327e..7b67e6da311 100644 --- a/compiler/testData/ir/irText/regressions/newInference/fixationOrder1.txt +++ b/compiler/testData/ir/irText/regressions/newInference/fixationOrder1.txt @@ -1,5 +1,5 @@ FILE fqName: fileName:/fixationOrder1.kt - FUN name:foo visibility:public modality:FINAL () returnType:(X) -> Y flags: + FUN name:foo visibility:public modality:FINAL () returnType:kotlin.Function1 flags: TYPE_PARAMETER name:X index:0 variance: superTypes:[kotlin.Any?] TYPE_PARAMETER name:Y index:1 variance: superTypes:[kotlin.Any?] BLOCK_BODY @@ -22,12 +22,12 @@ FILE fqName: fileName:/fixationOrder1.kt overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags: $this: VALUE_PARAMETER name: type:kotlin.Any flags: - FUN name:check visibility:public modality:FINAL (x:T, y:R, f:(T) -> R) returnType:Inv2 flags: + FUN name:check visibility:public modality:FINAL (x:T, y:R, f:kotlin.Function1) returnType:Inv2 flags: TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] TYPE_PARAMETER name:R index:1 variance: superTypes:[kotlin.Any?] VALUE_PARAMETER name:x index:0 type:T flags: VALUE_PARAMETER name:y index:1 type:R flags: - VALUE_PARAMETER name:f index:2 type:(T) -> R flags: + VALUE_PARAMETER name:f index:2 type:kotlin.Function1 flags: BLOCK_BODY RETURN type=kotlin.Nothing from='check(T, R, (T) -> R): Inv2' CALL 'TODO(): Nothing' type=kotlin.Nothing origin=null @@ -39,7 +39,7 @@ FILE fqName: fileName:/fixationOrder1.kt : kotlin.Int x: CONST String type=kotlin.String value="" y: CONST Int type=kotlin.Int value=1 - f: CALL 'foo(): (X) -> Y' type=(kotlin.String) -> kotlin.Int origin=null + f: CALL 'foo(): (X) -> Y' type=kotlin.Function1 origin=null : kotlin.String : kotlin.Int FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String flags: diff --git a/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.txt b/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.txt index 818e8ef3e54..3b0e287fce9 100644 --- a/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.txt +++ b/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.txt @@ -35,12 +35,11 @@ FILE fqName: fileName:/typeAliasCtorForGenericClass.kt TYPEALIAS typealias B2 = A> type=A> FUN name:bar visibility:public modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY - VAR name:b type:B /* = A */ flags:val + VAR name:b type:A flags:val CALL 'constructor A(Q)' type=A origin=null : kotlin.Int q: CONST Int type=kotlin.Int value=2 - VAR name:b2 type:B2 /* = A> */ flags:val + VAR name:b2 type:A> flags:val CALL 'constructor A(Q)' type=A> origin=null : A - q: GET_VAR 'b: B /* = A */' type=B /* = A */ origin=null - + q: GET_VAR 'b: B /* = A */' type=A origin=null diff --git a/compiler/testData/ir/irText/singletons/enumEntry.txt b/compiler/testData/ir/irText/singletons/enumEntry.txt index 6f9271aceb6..e27b8d1d225 100644 --- a/compiler/testData/ir/irText/singletons/enumEntry.txt +++ b/compiler/testData/ir/irText/singletons/enumEntry.txt @@ -52,9 +52,9 @@ FILE fqName: fileName:/enumEntry.kt overridden: FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:Z) returnType:kotlin.Int flags: overridden: @@ -94,9 +94,9 @@ FILE fqName: fileName:/enumEntry.kt overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: overridden: - FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + FUN IR_EXTERNAL_DECLARATION_STUB name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: $this: VALUE_PARAMETER name: type:kotlin.Enum flags: FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:Z) returnType:kotlin.Int flags: overridden: diff --git a/compiler/testData/ir/irText/stubs/builtinMap.txt b/compiler/testData/ir/irText/stubs/builtinMap.txt index 9bde0844df0..89721ac5670 100644 --- a/compiler/testData/ir/irText/stubs/builtinMap.txt +++ b/compiler/testData/ir/irText/stubs/builtinMap.txt @@ -16,23 +16,23 @@ FILE fqName: fileName:/builtinMap.kt pair: GET_VAR 'value-parameter pair: Pair' type=kotlin.Pair origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'apply(T.() -> Unit) on T: T' type=kotlin.collections.LinkedHashMap /* = java.util.LinkedHashMap */ origin=null - : kotlin.collections.LinkedHashMap /* = java.util.LinkedHashMap */ - $receiver: CALL 'constructor LinkedHashMap((MutableMap..Map?))' type=java.util.LinkedHashMap origin=null + then: CALL 'apply(T.() -> Unit) on T: T' type=java.util.LinkedHashMap origin=null + : java.util.LinkedHashMap + $receiver: CALL 'constructor LinkedHashMap((MutableMap..Map?))' type=java.util.LinkedHashMap origin=null : K1? : V1? p0: GET_VAR 'this@plus: Map' type=kotlin.collections.Map origin=null - block: BLOCK type=kotlin.collections.LinkedHashMap /* = java.util.LinkedHashMap */.() -> kotlin.Unit origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:kotlin.collections.LinkedHashMap /* = java.util.LinkedHashMap */) returnType:kotlin.Unit flags: - $receiver: VALUE_PARAMETER name: type:kotlin.collections.LinkedHashMap /* = java.util.LinkedHashMap */ flags: + block: BLOCK type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1, kotlin.Unit> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:java.util.LinkedHashMap) returnType:kotlin.Unit flags: + $receiver: VALUE_PARAMETER name: type:java.util.LinkedHashMap flags: BLOCK_BODY RETURN type=kotlin.Nothing from='() on LinkedHashMap /* = LinkedHashMap */: Unit' TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags: superTypes:[kotlin.Any] CALL 'put(K, V): V?' type=V1? origin=null - $this: GET_VAR 'this@: LinkedHashMap<(K1..K1?), (V1..V1?)>' type=kotlin.collections.LinkedHashMap /* = java.util.LinkedHashMap */ origin=null + $this: GET_VAR 'this@: LinkedHashMap<(K1..K1?), (V1..V1?)>' type=java.util.LinkedHashMap origin=null key: CALL '(): A' type=K1 origin=GET_PROPERTY $this: GET_VAR 'value-parameter pair: Pair' type=kotlin.Pair origin=null value: CALL '(): B' type=V1 origin=GET_PROPERTY $this: GET_VAR 'value-parameter pair: Pair' type=kotlin.Pair origin=null - FUNCTION_REFERENCE '() on LinkedHashMap /* = LinkedHashMap */: Unit' type=kotlin.collections.LinkedHashMap /* = java.util.LinkedHashMap */.() -> kotlin.Unit origin=LAMBDA + FUNCTION_REFERENCE '() on LinkedHashMap /* = LinkedHashMap */: Unit' type=@[CALL 'constructor ExtensionFunctionType()' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1, kotlin.Unit> origin=LAMBDA diff --git a/compiler/testData/ir/irText/stubs/jdkClassSyntheticProperty.txt b/compiler/testData/ir/irText/stubs/jdkClassSyntheticProperty.txt index ae60acc8f8e..c5140c68af2 100644 --- a/compiler/testData/ir/irText/stubs/jdkClassSyntheticProperty.txt +++ b/compiler/testData/ir/irText/stubs/jdkClassSyntheticProperty.txt @@ -1,10 +1,10 @@ FILE fqName: fileName:/jdkClassSyntheticProperty.kt PROPERTY name:test visibility:public modality:FINAL flags:val - FUN name: visibility:public modality:FINAL <> ($receiver:java.lang.Class<*>) returnType:kotlin.Array? flags: + FUN name: visibility:public modality:FINAL <> ($receiver:java.lang.Class<*>) returnType:kotlin.Array? flags: correspondingProperty: PROPERTY name:test visibility:public modality:FINAL flags:val $receiver: VALUE_PARAMETER name: type:java.lang.Class<*> flags: BLOCK_BODY RETURN type=kotlin.Nothing from='() on Class<*>: Array<(out) Field!>!' - CALL 'getDeclaredFields(): Array<(out) Field!>!' type=kotlin.Array? origin=GET_PROPERTY + CALL 'getDeclaredFields(): Array<(out) Field!>!' type=kotlin.Array? origin=GET_PROPERTY <`0>: kotlin.Any? $this: GET_VAR 'this@test: Class<*>' type=java.lang.Class<*> origin=null diff --git a/compiler/testData/ir/sourceRanges/augmentedAssignmentWithExpression.txt b/compiler/testData/ir/sourceRanges/augmentedAssignmentWithExpression.txt index 784329f7a23..799e2d07b07 100644 --- a/compiler/testData/ir/sourceRanges/augmentedAssignmentWithExpression.txt +++ b/compiler/testData/ir/sourceRanges/augmentedAssignmentWithExpression.txt @@ -37,10 +37,10 @@ @17:4..14 CALL 'plusAssign(Int): Unit' type=kotlin.Unit origin=PLUSEQ @17:4..9 CALL 'foo(): Host' type=test.Host origin=null @17:13..14 CONST Int type=kotlin.Int value=1 - @20:0..22:1 FUN name:test4 visibility:public modality:FINAL <> (a:() -> test.Host) returnType:kotlin.Unit flags: - @20:10..23 VALUE_PARAMETER name:a index:0 type:() -> test.Host flags: + @20:0..22:1 FUN name:test4 visibility:public modality:FINAL <> (a:kotlin.Function0) returnType:kotlin.Unit flags: + @20:10..23 VALUE_PARAMETER name:a index:0 type:kotlin.Function0 flags: @20:25..22:1 BLOCK_BODY @21:4..12 CALL 'plusAssign(Int): Unit' type=kotlin.Unit origin=PLUSEQ @21:4..7 CALL 'invoke(): R' type=test.Host origin=INVOKE - @21:4..5 GET_VAR 'value-parameter a: () -> Host' type=() -> test.Host origin=VARIABLE_AS_FUNCTION + @21:4..5 GET_VAR 'value-parameter a: () -> Host' type=kotlin.Function0 origin=VARIABLE_AS_FUNCTION @21:11..12 CONST Int type=kotlin.Int value=1 diff --git a/compiler/testData/ir/sourceRanges/declarations/classes.txt b/compiler/testData/ir/sourceRanges/declarations/classes.txt index e71805222ac..5bc5cb2590b 100644 --- a/compiler/testData/ir/sourceRanges/declarations/classes.txt +++ b/compiler/testData/ir/sourceRanges/declarations/classes.txt @@ -61,7 +61,7 @@ @17:0..18:11 VALUE_PARAMETER name: type:kotlin.Enum flags: @18:0..11 FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit flags: @17:0..18:11 VALUE_PARAMETER name: type:kotlin.Enum flags: - @18:0..11 FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: + @18:0..11 FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:java.lang.Class? flags: @17:0..18:11 VALUE_PARAMETER name: type:kotlin.Enum flags: @18:0..11 FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:Test5) returnType:kotlin.Int flags: @17:0..18:11 VALUE_PARAMETER name: type:kotlin.Enum flags: