diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt index 73e6ccd62b5..4a43d31f5ed 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt @@ -550,7 +550,7 @@ class Fir2IrVisitor( ) } else if (delegate != null) { backingField = createBackingField( - property, IrDeclarationOrigin.DELEGATE, descriptor, + property, IrDeclarationOrigin.PROPERTY_DELEGATE, descriptor, Visibilities.PRIVATE, Name.identifier("${property.name}\$delegate"), true, delegate ) } diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ClassCodegen.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ClassCodegen.kt index 21d264875fb..b4c14c89d0e 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ClassCodegen.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ClassCodegen.kt @@ -320,7 +320,7 @@ open class ClassCodegen protected constructor( val fieldType = typeMapper.mapType(field) val fieldSignature = - if (field.origin == IrDeclarationOrigin.DELEGATE) null + if (field.origin == IrDeclarationOrigin.PROPERTY_DELEGATE) null else methodSignatureMapper.mapFieldSignature(field) val fieldName = field.name.asString() val fv = visitor.newField( diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/AnnotationGenerator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/AnnotationGenerator.kt index 23e834d2396..7a24f55cb98 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/AnnotationGenerator.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/AnnotationGenerator.kt @@ -36,7 +36,7 @@ class AnnotationGenerator(context: GeneratorContext) : IrElementVisitorVoid { // Delegate field is mapped to a new property descriptor with annotations of the original property delegate // (see IrPropertyDelegateDescriptorImpl), but annotations on backing fields should be processed manually here val annotatedDescriptor = - if (declaration is IrField && declaration.origin != IrDeclarationOrigin.DELEGATE) + if (declaration is IrField && declaration.origin != IrDeclarationOrigin.PROPERTY_DELEGATE) declaration.descriptor.backingField else declaration.descriptor diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/DelegatedPropertyGenerator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/DelegatedPropertyGenerator.kt index ad6e22bcb78..95f469efab7 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/DelegatedPropertyGenerator.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/DelegatedPropertyGenerator.kt @@ -125,7 +125,7 @@ class DelegatedPropertyGenerator(declarationGenerator: DeclarationGenerator) : D val startOffset = ktDelegate.startOffsetSkippingComments val endOffset = ktDelegate.endOffset - val origin = IrDeclarationOrigin.DELEGATE + val origin = IrDeclarationOrigin.PROPERTY_DELEGATE val type = delegateDescriptor.type.toIrType() return context.symbolTable.declareField( startOffset, endOffset, origin, delegateDescriptor, type @@ -287,7 +287,7 @@ class DelegatedPropertyGenerator(declarationGenerator: DeclarationGenerator) : D val delegateDescriptor = createLocalPropertyDelegatedDescriptor(variableDescriptor, delegateType, kPropertyType) return context.symbolTable.declareVariable( - ktDelegate.startOffsetSkippingComments, ktDelegate.endOffset, IrDeclarationOrigin.DELEGATE, + ktDelegate.startOffsetSkippingComments, ktDelegate.endOffset, IrDeclarationOrigin.PROPERTY_DELEGATE, delegateDescriptor, delegateDescriptor.type.toIrType() ).also { irVariable -> irVariable.initializer = generateInitializerForLocalDelegatedPropertyDelegate( diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrDeclarationOrigin.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrDeclarationOrigin.kt index b8c809100fd..a0d1364d9e9 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrDeclarationOrigin.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrDeclarationOrigin.kt @@ -24,7 +24,8 @@ interface IrDeclarationOrigin { object FOR_LOOP_IMPLICIT_VARIABLE : IrDeclarationOriginImpl("FOR_LOOP_IMPLICIT_VARIABLE") object PROPERTY_BACKING_FIELD : IrDeclarationOriginImpl("PROPERTY_BACKING_FIELD") object DEFAULT_PROPERTY_ACCESSOR : IrDeclarationOriginImpl("DEFAULT_PROPERTY_ACCESSOR") - object DELEGATE : IrDeclarationOriginImpl("DELEGATE") + object DELEGATE : IrDeclarationOriginImpl("DELEGATE", isSynthetic = true) + object PROPERTY_DELEGATE : IrDeclarationOriginImpl("PROPERTY_DELEGATE") object DELEGATED_PROPERTY_ACCESSOR : IrDeclarationOriginImpl("DELEGATED_PROPERTY_ACCESSOR") object DELEGATED_MEMBER : IrDeclarationOriginImpl("DELEGATED_MEMBER") object ENUM_CLASS_SPECIAL_MEMBER : IrDeclarationOriginImpl("ENUM_CLASS_SPECIAL_MEMBER") diff --git a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.fir.txt b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.fir.txt index 8e758eef185..36a1ec015fa 100644 --- a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.fir.txt @@ -18,7 +18,7 @@ FILE fqName: fileName:/delegateFieldWithAnnotations.kt PROPERTY name:test1 visibility:public modality:FINAL [delegated,val] annotations: Ann - FIELD DELEGATE name:test1$delegate type:kotlin.Lazy visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:test1$delegate type:kotlin.Lazy visibility:private [final,static] EXPRESSION_BODY CALL 'public final fun lazy (initializer: kotlin.Function0): kotlin.Lazy declared in kotlin' type=kotlin.Lazy origin=null : kotlin.Int @@ -32,6 +32,6 @@ FILE fqName: fileName:/delegateFieldWithAnnotations.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): T of kotlin.getValue [inline,operator] declared in kotlin' type=kotlin.Int origin=null : kotlin.Int - $receiver: GET_FIELD 'FIELD DELEGATE name:test1$delegate type:kotlin.Lazy visibility:private [final,static]' type=kotlin.Lazy origin=GET_PROPERTY + $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test1$delegate type:kotlin.Lazy visibility:private [final,static]' type=kotlin.Lazy origin=GET_PROPERTY thisRef: CONST Null type=kotlin.Nothing? value=null - property: PROPERTY_REFERENCE 'public final test1: kotlin.Int [delegated,val]' field='FIELD DELEGATE name:test1$delegate type:kotlin.Lazy visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=null + property: PROPERTY_REFERENCE 'public final test1: kotlin.Int [delegated,val]' field='FIELD PROPERTY_DELEGATE name:test1$delegate type:kotlin.Lazy visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=null diff --git a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.txt index c5f48ee258c..81a7539b596 100644 --- a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.txt @@ -16,7 +16,7 @@ FILE fqName: fileName:/delegateFieldWithAnnotations.kt public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation $this: VALUE_PARAMETER name: type:kotlin.Any PROPERTY name:test1 visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:test1$delegate type:kotlin.Lazy visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:test1$delegate type:kotlin.Lazy visibility:private [final,static] annotations: Ann EXPRESSION_BODY @@ -33,6 +33,6 @@ FILE fqName: fileName:/delegateFieldWithAnnotations.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): T of kotlin.getValue [inline,operator] declared in kotlin' type=kotlin.Int origin=null : kotlin.Int - $receiver: GET_FIELD 'FIELD DELEGATE name:test1$delegate type:kotlin.Lazy visibility:private [final,static]' type=kotlin.Lazy origin=null + $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test1$delegate type:kotlin.Lazy visibility:private [final,static]' type=kotlin.Lazy origin=null thisRef: CONST Null type=kotlin.Nothing? value=null property: PROPERTY_REFERENCE 'public final test1: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE diff --git a/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.fir.txt b/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.fir.txt index a8d0592c240..14bb1430e3a 100644 --- a/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.fir.txt @@ -86,7 +86,7 @@ FILE fqName: fileName:/delegatedPropertyAccessorsWithAnnotations.kt PROPERTY name:test1 visibility:public modality:FINAL [delegated,val] annotations: A(x = 'test1.get') - FIELD DELEGATE name:test1$delegate type:.Cell visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:test1$delegate type:.Cell visibility:private [final,static] EXPRESSION_BODY CONSTRUCTOR_CALL 'public constructor (value: kotlin.Int) [primary] declared in .Cell' type=.Cell origin=null value: CONST Int type=kotlin.Int value=1 @@ -95,15 +95,15 @@ FILE fqName: fileName:/delegatedPropertyAccessorsWithAnnotations.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' CALL 'public final fun getValue (thisRef: kotlin.Any?, kProp: kotlin.Any?): kotlin.Int [operator] declared in .Cell' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD DELEGATE name:test1$delegate type:.Cell visibility:private [final,static]' type=.Cell origin=GET_PROPERTY + $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test1$delegate type:.Cell visibility:private [final,static]' type=.Cell origin=GET_PROPERTY thisRef: CONST Null type=kotlin.Nothing? value=null - kProp: PROPERTY_REFERENCE 'public final test1: kotlin.Int [delegated,val]' field='FIELD DELEGATE name:test1$delegate type:.Cell visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=null + kProp: PROPERTY_REFERENCE 'public final test1: kotlin.Int [delegated,val]' field='FIELD PROPERTY_DELEGATE name:test1$delegate type:.Cell visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=null PROPERTY name:test2 visibility:public modality:FINAL [delegated,var] annotations: A(x = 'test2.get') A(x = 'test2.set') A(x = 'test2.set.param') - FIELD DELEGATE name:test2$delegate type:.Cell visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:test2$delegate type:.Cell visibility:private [final,static] EXPRESSION_BODY CONSTRUCTOR_CALL 'public constructor (value: kotlin.Int) [primary] declared in .Cell' type=.Cell origin=null value: CONST Int type=kotlin.Int value=2 @@ -112,15 +112,15 @@ FILE fqName: fileName:/delegatedPropertyAccessorsWithAnnotations.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' CALL 'public final fun getValue (thisRef: kotlin.Any?, kProp: kotlin.Any?): kotlin.Int [operator] declared in .Cell' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD DELEGATE name:test2$delegate type:.Cell visibility:private [final,static]' type=.Cell origin=GET_PROPERTY + $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test2$delegate type:.Cell visibility:private [final,static]' type=.Cell origin=GET_PROPERTY thisRef: CONST Null type=kotlin.Nothing? value=null - kProp: PROPERTY_REFERENCE 'public final test2: kotlin.Int [delegated,var]' field='FIELD DELEGATE name:test2$delegate type:.Cell visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KProperty<*> origin=null + kProp: PROPERTY_REFERENCE 'public final test2: kotlin.Int [delegated,var]' field='FIELD PROPERTY_DELEGATE name:test2$delegate type:.Cell visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KProperty<*> origin=null FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:kotlin.Int) returnType:kotlin.Unit correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [delegated,var] VALUE_PARAMETER name: index:0 type:kotlin.Int BLOCK_BODY CALL 'public final fun setValue (thisRef: kotlin.Any?, kProp: kotlin.Any?, newValue: kotlin.Int): kotlin.Unit [operator] declared in .Cell' type=kotlin.Unit origin=null - $this: GET_FIELD 'FIELD DELEGATE name:test2$delegate type:.Cell visibility:private [final,static]' type=.Cell origin=GET_PROPERTY + $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test2$delegate type:.Cell visibility:private [final,static]' type=.Cell origin=GET_PROPERTY thisRef: CONST Null type=kotlin.Nothing? value=null - kProp: PROPERTY_REFERENCE 'public final test2: kotlin.Int [delegated,var]' field='FIELD DELEGATE name:test2$delegate type:.Cell visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KProperty<*> origin=null + kProp: PROPERTY_REFERENCE 'public final test2: kotlin.Int [delegated,var]' field='FIELD PROPERTY_DELEGATE name:test2$delegate type:.Cell visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KProperty<*> origin=null newValue: GET_VAR ': kotlin.Int declared in .' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.txt index 1ef0c9b7621..0f18bc54417 100644 --- a/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.txt @@ -84,7 +84,7 @@ FILE fqName: fileName:/delegatedPropertyAccessorsWithAnnotations.kt public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any PROPERTY name:test1 visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:test1$delegate type:.Cell visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:test1$delegate type:.Cell visibility:private [final,static] EXPRESSION_BODY CONSTRUCTOR_CALL 'public constructor (value: kotlin.Int) [primary] declared in .Cell' type=.Cell origin=null value: CONST Int type=kotlin.Int value=1 @@ -95,11 +95,11 @@ FILE fqName: fileName:/delegatedPropertyAccessorsWithAnnotations.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' CALL 'public final fun getValue (thisRef: kotlin.Any?, kProp: kotlin.Any?): kotlin.Int [operator] declared in .Cell' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD DELEGATE name:test1$delegate type:.Cell visibility:private [final,static]' type=.Cell origin=null + $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test1$delegate type:.Cell visibility:private [final,static]' type=.Cell origin=null thisRef: CONST Null type=kotlin.Nothing? value=null kProp: PROPERTY_REFERENCE 'public final test1: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE PROPERTY name:test2 visibility:public modality:FINAL [delegated,var] - FIELD DELEGATE name:test2$delegate type:.Cell visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:test2$delegate type:.Cell visibility:private [final,static] EXPRESSION_BODY CONSTRUCTOR_CALL 'public constructor (value: kotlin.Int) [primary] declared in .Cell' type=.Cell origin=null value: CONST Int type=kotlin.Int value=2 @@ -110,7 +110,7 @@ FILE fqName: fileName:/delegatedPropertyAccessorsWithAnnotations.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' CALL 'public final fun getValue (thisRef: kotlin.Any?, kProp: kotlin.Any?): kotlin.Int [operator] declared in .Cell' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD DELEGATE name:test2$delegate type:.Cell visibility:private [final,static]' type=.Cell origin=null + $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test2$delegate type:.Cell visibility:private [final,static]' type=.Cell origin=null thisRef: CONST Null type=kotlin.Nothing? value=null kProp: PROPERTY_REFERENCE 'public final test2: kotlin.Int [delegated,var]' field=null getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:kotlin.Int) returnType:kotlin.Unit @@ -123,7 +123,7 @@ FILE fqName: fileName:/delegatedPropertyAccessorsWithAnnotations.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (: kotlin.Int): kotlin.Unit declared in ' CALL 'public final fun setValue (thisRef: kotlin.Any?, kProp: kotlin.Any?, newValue: kotlin.Int): kotlin.Unit [operator] declared in .Cell' type=kotlin.Unit origin=null - $this: GET_FIELD 'FIELD DELEGATE name:test2$delegate type:.Cell visibility:private [final,static]' type=.Cell origin=null + $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test2$delegate type:.Cell visibility:private [final,static]' type=.Cell origin=null thisRef: CONST Null type=kotlin.Nothing? value=null kProp: PROPERTY_REFERENCE 'public final test2: kotlin.Int [delegated,var]' field=null getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE newValue: GET_VAR ': kotlin.Int declared in .' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.txt index e4048c2b043..d7e240d2665 100644 --- a/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.txt @@ -33,7 +33,7 @@ FILE fqName: fileName:/localDelegatedPropertiesWithAnnotations.kt LOCAL_DELEGATED_PROPERTY name:test type:kotlin.Int flags:val annotations: A(x = 'foo/test') - VAR DELEGATE name:test$delegate type:kotlin.Lazy [val] + VAR PROPERTY_DELEGATE name:test$delegate type:kotlin.Lazy [val] CALL 'public final fun lazy (initializer: kotlin.Function0): kotlin.Lazy declared in kotlin' type=kotlin.Lazy origin=null : kotlin.Int initializer: FUN_EXPR type=kotlin.Function0 origin=LAMBDA diff --git a/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt b/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt index 24e61e4b2ce..14ef8736540 100644 --- a/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt +++ b/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt @@ -83,7 +83,7 @@ FILE fqName: fileName:/classLevelProperties.kt correspondingProperty: PROPERTY name:test6 visibility:public modality:FINAL [val] $this: VALUE_PARAMETER name: type:.C PROPERTY name:test7 visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final] + FIELD PROPERTY_DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final] EXPRESSION_BODY CALL 'public final fun lazy (initializer: kotlin.Function0): kotlin.Lazy declared in kotlin' type=kotlin.Lazy origin=null : kotlin.Int @@ -99,11 +99,11 @@ FILE fqName: fileName:/classLevelProperties.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .C' CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): T of kotlin.getValue [inline,operator] declared in kotlin' type=kotlin.Int origin=null : kotlin.Int - $receiver: GET_FIELD 'FIELD DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final]' type=kotlin.Lazy origin=GET_PROPERTY + $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final]' type=kotlin.Lazy origin=GET_PROPERTY thisRef: GET_VAR ': .C declared in .C' type=.C origin=null - property: PROPERTY_REFERENCE 'public final test7: kotlin.Int [delegated,val]' field='FIELD DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final]' getter='public final fun (): kotlin.Int declared in .C' setter=null type=kotlin.reflect.KProperty<*> origin=null + property: PROPERTY_REFERENCE 'public final test7: kotlin.Int [delegated,val]' field='FIELD PROPERTY_DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final]' getter='public final fun (): kotlin.Int declared in .C' setter=null type=kotlin.reflect.KProperty<*> origin=null PROPERTY name:test8 visibility:public modality:FINAL [delegated,var] - FIELD DELEGATE name:test8$delegate type:java.util.HashMap visibility:private [final] + FIELD PROPERTY_DELEGATE name:test8$delegate type:java.util.HashMap visibility:private [final] EXPRESSION_BODY CALL 'public final fun hashMapOf (): java.util.HashMap [inline] declared in kotlin.collections' type=java.util.HashMap origin=null : kotlin.String @@ -115,7 +115,7 @@ FILE fqName: fileName:/classLevelProperties.kt RETURN type=kotlin.Nothing from='public final fun (): IrErrorType declared in .C' ERROR_CALL 'Unresolved reference: #' type=IrErrorType GET_VAR ': .C declared in .C' type=.C origin=null - PROPERTY_REFERENCE 'public final test8: IrErrorType [delegated,var]' field='FIELD DELEGATE name:test8$delegate type:java.util.HashMap visibility:private [final]' getter='public final fun (): IrErrorType declared in .C' setter='public final fun (: IrErrorType): kotlin.Unit declared in .C' type=kotlin.reflect.KProperty<*> origin=null + PROPERTY_REFERENCE 'public final test8: IrErrorType [delegated,var]' field='FIELD PROPERTY_DELEGATE name:test8$delegate type:java.util.HashMap visibility:private [final]' getter='public final fun (): IrErrorType declared in .C' setter='public final fun (: IrErrorType): kotlin.Unit declared in .C' type=kotlin.reflect.KProperty<*> origin=null FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.C, :IrErrorType) returnType:kotlin.Unit correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [delegated,var] $this: VALUE_PARAMETER name: type:.C @@ -123,7 +123,7 @@ FILE fqName: fileName:/classLevelProperties.kt BLOCK_BODY ERROR_CALL 'Unresolved reference: #' type=IrErrorType GET_VAR ': .C declared in .C' type=.C origin=null - PROPERTY_REFERENCE 'public final test8: IrErrorType [delegated,var]' field='FIELD DELEGATE name:test8$delegate type:java.util.HashMap visibility:private [final]' getter='public final fun (): IrErrorType declared in .C' setter='public final fun (: IrErrorType): kotlin.Unit declared in .C' type=kotlin.reflect.KProperty<*> origin=null + PROPERTY_REFERENCE 'public final test8: IrErrorType [delegated,var]' field='FIELD PROPERTY_DELEGATE name:test8$delegate type:java.util.HashMap visibility:private [final]' getter='public final fun (): IrErrorType declared in .C' setter='public final fun (: IrErrorType): kotlin.Unit declared in .C' type=kotlin.reflect.KProperty<*> origin=null GET_VAR ': IrErrorType declared in .C.' type=IrErrorType origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: diff --git a/compiler/testData/ir/irText/declarations/classLevelProperties.txt b/compiler/testData/ir/irText/declarations/classLevelProperties.txt index 6d94e19821b..6f033f9a951 100644 --- a/compiler/testData/ir/irText/declarations/classLevelProperties.txt +++ b/compiler/testData/ir/irText/declarations/classLevelProperties.txt @@ -92,7 +92,7 @@ FILE fqName: fileName:/classLevelProperties.kt GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test6 type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null receiver: GET_VAR ': .C declared in .C.' type=.C origin=null PROPERTY name:test7 visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final] + FIELD PROPERTY_DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final] EXPRESSION_BODY CALL 'public final fun lazy (initializer: kotlin.Function0): kotlin.Lazy declared in kotlin' type=kotlin.Lazy origin=null : kotlin.Int @@ -108,12 +108,12 @@ FILE fqName: fileName:/classLevelProperties.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .C' CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): T of kotlin.getValue [inline,operator] declared in kotlin' type=kotlin.Int origin=null : kotlin.Int - $receiver: GET_FIELD 'FIELD DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final]' type=kotlin.Lazy origin=null + $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final]' type=kotlin.Lazy origin=null receiver: GET_VAR ': .C declared in .C.' type=.C origin=null thisRef: GET_VAR ': .C declared in .C.' type=.C origin=null property: PROPERTY_REFERENCE 'public final test7: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in .C' setter=null type=kotlin.reflect.KProperty1<.C, kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE PROPERTY name:test8 visibility:public modality:FINAL [delegated,var] - FIELD DELEGATE name:test8$delegate type:java.util.HashMap{ kotlin.collections.HashMap } visibility:private [final] + FIELD PROPERTY_DELEGATE name:test8$delegate type:java.util.HashMap{ kotlin.collections.HashMap } visibility:private [final] EXPRESSION_BODY CALL 'public final fun hashMapOf (): java.util.HashMap{ kotlin.collections.HashMap } [inline] declared in kotlin.collections' type=java.util.HashMap{ kotlin.collections.HashMap } origin=null : kotlin.String @@ -126,7 +126,7 @@ FILE fqName: fileName:/classLevelProperties.kt CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): V1 of kotlin.collections.getValue [inline,operator] declared in kotlin.collections' type=kotlin.Int origin=null : kotlin.Int : kotlin.Int - $receiver: GET_FIELD 'FIELD DELEGATE name:test8$delegate type:java.util.HashMap{ kotlin.collections.HashMap } visibility:private [final]' type=java.util.HashMap{ kotlin.collections.HashMap } origin=null + $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test8$delegate type:java.util.HashMap{ kotlin.collections.HashMap } visibility:private [final]' type=java.util.HashMap{ kotlin.collections.HashMap } origin=null receiver: GET_VAR ': .C declared in .C.' type=.C origin=null thisRef: GET_VAR ': .C declared in .C.' type=.C origin=null property: PROPERTY_REFERENCE 'public final test8: kotlin.Int [delegated,var]' field=null getter='public final fun (): kotlin.Int declared in .C' setter='public final fun (: kotlin.Int): kotlin.Unit declared in .C' type=kotlin.reflect.KMutableProperty1<.C, kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE @@ -138,7 +138,7 @@ FILE fqName: fileName:/classLevelProperties.kt RETURN type=kotlin.Nothing from='public final fun (: kotlin.Int): kotlin.Unit declared in .C' CALL 'public final fun setValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>, value: V of kotlin.collections.setValue): kotlin.Unit [inline,operator] declared in kotlin.collections' type=kotlin.Unit origin=null : kotlin.Int - $receiver: GET_FIELD 'FIELD DELEGATE name:test8$delegate type:java.util.HashMap{ kotlin.collections.HashMap } visibility:private [final]' type=java.util.HashMap{ kotlin.collections.HashMap } origin=null + $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test8$delegate type:java.util.HashMap{ kotlin.collections.HashMap } visibility:private [final]' type=java.util.HashMap{ kotlin.collections.HashMap } origin=null receiver: GET_VAR ': .C declared in .C.' type=.C origin=null thisRef: GET_VAR ': .C declared in .C.' type=.C origin=null property: PROPERTY_REFERENCE 'public final test8: kotlin.Int [delegated,var]' field=null getter='public final fun (): kotlin.Int declared in .C' setter='public final fun (: kotlin.Int): kotlin.Unit declared in .C' type=kotlin.reflect.KMutableProperty1<.C, kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE diff --git a/compiler/testData/ir/irText/declarations/delegatedProperties.fir.txt b/compiler/testData/ir/irText/declarations/delegatedProperties.fir.txt index ce2f445ae13..f0b5c991d4d 100644 --- a/compiler/testData/ir/irText/declarations/delegatedProperties.fir.txt +++ b/compiler/testData/ir/irText/declarations/delegatedProperties.fir.txt @@ -1,6 +1,6 @@ FILE fqName: fileName:/delegatedProperties.kt PROPERTY name:test1 visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:test1$delegate type:kotlin.Lazy visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:test1$delegate type:kotlin.Lazy visibility:private [final,static] EXPRESSION_BODY CALL 'public final fun lazy (initializer: kotlin.Function0): kotlin.Lazy declared in kotlin' type=kotlin.Lazy origin=null : kotlin.Int @@ -14,9 +14,9 @@ FILE fqName: fileName:/delegatedProperties.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): T of kotlin.getValue [inline,operator] declared in kotlin' type=kotlin.Int origin=null : kotlin.Int - $receiver: GET_FIELD 'FIELD DELEGATE name:test1$delegate type:kotlin.Lazy visibility:private [final,static]' type=kotlin.Lazy origin=GET_PROPERTY + $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test1$delegate type:kotlin.Lazy visibility:private [final,static]' type=kotlin.Lazy origin=GET_PROPERTY thisRef: CONST Null type=kotlin.Nothing? value=null - property: PROPERTY_REFERENCE 'public final test1: kotlin.Int [delegated,val]' field='FIELD DELEGATE name:test1$delegate type:kotlin.Lazy visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=null + property: PROPERTY_REFERENCE 'public final test1: kotlin.Int [delegated,val]' field='FIELD PROPERTY_DELEGATE name:test1$delegate type:kotlin.Lazy visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=null CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.C CONSTRUCTOR visibility:public <> (map:kotlin.collections.MutableMap) returnType:.C [primary] @@ -36,7 +36,7 @@ FILE fqName: fileName:/delegatedProperties.kt GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:map type:kotlin.collections.MutableMap visibility:private [final]' type=kotlin.collections.MutableMap origin=null receiver: GET_VAR ': .C declared in .C.' type=.C origin=null PROPERTY name:test2 visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:test2$delegate type:kotlin.Lazy visibility:private [final] + FIELD PROPERTY_DELEGATE name:test2$delegate type:kotlin.Lazy visibility:private [final] EXPRESSION_BODY CALL 'public final fun lazy (initializer: kotlin.Function0): kotlin.Lazy declared in kotlin' type=kotlin.Lazy origin=null : kotlin.Int @@ -52,11 +52,11 @@ FILE fqName: fileName:/delegatedProperties.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .C' CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): T of kotlin.getValue [inline,operator] declared in kotlin' type=kotlin.Int origin=null : kotlin.Int - $receiver: GET_FIELD 'FIELD DELEGATE name:test2$delegate type:kotlin.Lazy visibility:private [final]' type=kotlin.Lazy origin=GET_PROPERTY + $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test2$delegate type:kotlin.Lazy visibility:private [final]' type=kotlin.Lazy origin=GET_PROPERTY thisRef: GET_VAR ': .C declared in .C' type=.C origin=null - property: PROPERTY_REFERENCE 'public final test2: kotlin.Int [delegated,val]' field='FIELD DELEGATE name:test2$delegate type:kotlin.Lazy visibility:private [final]' getter='public final fun (): kotlin.Int declared in .C' setter=null type=kotlin.reflect.KProperty<*> origin=null + property: PROPERTY_REFERENCE 'public final test2: kotlin.Int [delegated,val]' field='FIELD PROPERTY_DELEGATE name:test2$delegate type:kotlin.Lazy visibility:private [final]' getter='public final fun (): kotlin.Int declared in .C' setter=null type=kotlin.reflect.KProperty<*> origin=null PROPERTY name:test3 visibility:public modality:FINAL [delegated,var] - FIELD DELEGATE name:test3$delegate type:kotlin.collections.MutableMap visibility:private [final] + FIELD PROPERTY_DELEGATE name:test3$delegate type:kotlin.collections.MutableMap visibility:private [final] EXPRESSION_BODY GET_VAR 'map: kotlin.collections.MutableMap declared in .C.' type=kotlin.collections.MutableMap origin=null FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.C) returnType:IrErrorType @@ -66,7 +66,7 @@ FILE fqName: fileName:/delegatedProperties.kt RETURN type=kotlin.Nothing from='public final fun (): IrErrorType declared in .C' ERROR_CALL 'Unresolved reference: #' type=IrErrorType GET_VAR ': .C declared in .C' type=.C origin=null - PROPERTY_REFERENCE 'public final test3: IrErrorType [delegated,var]' field='FIELD DELEGATE name:test3$delegate type:kotlin.collections.MutableMap visibility:private [final]' getter='public final fun (): IrErrorType declared in .C' setter='public final fun (: IrErrorType): kotlin.Unit declared in .C' type=kotlin.reflect.KProperty<*> origin=null + PROPERTY_REFERENCE 'public final test3: IrErrorType [delegated,var]' field='FIELD PROPERTY_DELEGATE name:test3$delegate type:kotlin.collections.MutableMap visibility:private [final]' getter='public final fun (): IrErrorType declared in .C' setter='public final fun (: IrErrorType): kotlin.Unit declared in .C' type=kotlin.reflect.KProperty<*> origin=null FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.C, :IrErrorType) returnType:kotlin.Unit correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [delegated,var] $this: VALUE_PARAMETER name: type:.C @@ -74,7 +74,7 @@ FILE fqName: fileName:/delegatedProperties.kt BLOCK_BODY ERROR_CALL 'Unresolved reference: #' type=IrErrorType GET_VAR ': .C declared in .C' type=.C origin=null - PROPERTY_REFERENCE 'public final test3: IrErrorType [delegated,var]' field='FIELD DELEGATE name:test3$delegate type:kotlin.collections.MutableMap visibility:private [final]' getter='public final fun (): IrErrorType declared in .C' setter='public final fun (: IrErrorType): kotlin.Unit declared in .C' type=kotlin.reflect.KProperty<*> origin=null + PROPERTY_REFERENCE 'public final test3: IrErrorType [delegated,var]' field='FIELD PROPERTY_DELEGATE name:test3$delegate type:kotlin.collections.MutableMap visibility:private [final]' getter='public final fun (): IrErrorType declared in .C' setter='public final fun (: IrErrorType): kotlin.Unit declared in .C' type=kotlin.reflect.KProperty<*> origin=null GET_VAR ': IrErrorType declared in .C.' type=IrErrorType origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: @@ -90,7 +90,7 @@ FILE fqName: fileName:/delegatedProperties.kt public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any PROPERTY name:test4 visibility:public modality:FINAL [delegated,var] - FIELD DELEGATE name:test4$delegate type:java.util.HashMap visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:test4$delegate type:java.util.HashMap visibility:private [final,static] EXPRESSION_BODY CALL 'public final fun hashMapOf (): java.util.HashMap [inline] declared in kotlin.collections' type=java.util.HashMap origin=null : kotlin.String @@ -101,12 +101,12 @@ FILE fqName: fileName:/delegatedProperties.kt RETURN type=kotlin.Nothing from='public final fun (): IrErrorType declared in ' ERROR_CALL 'Unresolved reference: #' type=IrErrorType CONST Null type=kotlin.Nothing? value=null - PROPERTY_REFERENCE 'public final test4: IrErrorType [delegated,var]' field='FIELD DELEGATE name:test4$delegate type:java.util.HashMap visibility:private [final,static]' getter='public final fun (): IrErrorType declared in ' setter='public final fun (: IrErrorType): kotlin.Unit declared in ' type=kotlin.reflect.KProperty<*> origin=null + PROPERTY_REFERENCE 'public final test4: IrErrorType [delegated,var]' field='FIELD PROPERTY_DELEGATE name:test4$delegate type:java.util.HashMap visibility:private [final,static]' getter='public final fun (): IrErrorType declared in ' setter='public final fun (: IrErrorType): kotlin.Unit declared in ' type=kotlin.reflect.KProperty<*> origin=null FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:IrErrorType) returnType:kotlin.Unit correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL [delegated,var] VALUE_PARAMETER name: index:0 type:IrErrorType BLOCK_BODY ERROR_CALL 'Unresolved reference: #' type=IrErrorType CONST Null type=kotlin.Nothing? value=null - PROPERTY_REFERENCE 'public final test4: IrErrorType [delegated,var]' field='FIELD DELEGATE name:test4$delegate type:java.util.HashMap visibility:private [final,static]' getter='public final fun (): IrErrorType declared in ' setter='public final fun (: IrErrorType): kotlin.Unit declared in ' type=kotlin.reflect.KProperty<*> origin=null + PROPERTY_REFERENCE 'public final test4: IrErrorType [delegated,var]' field='FIELD PROPERTY_DELEGATE name:test4$delegate type:java.util.HashMap visibility:private [final,static]' getter='public final fun (): IrErrorType declared in ' setter='public final fun (: IrErrorType): kotlin.Unit declared in ' type=kotlin.reflect.KProperty<*> origin=null GET_VAR ': IrErrorType declared in .' type=IrErrorType origin=null diff --git a/compiler/testData/ir/irText/declarations/delegatedProperties.txt b/compiler/testData/ir/irText/declarations/delegatedProperties.txt index 1953bf9eab5..e1ad9d5af12 100644 --- a/compiler/testData/ir/irText/declarations/delegatedProperties.txt +++ b/compiler/testData/ir/irText/declarations/delegatedProperties.txt @@ -1,6 +1,6 @@ FILE fqName: fileName:/delegatedProperties.kt PROPERTY name:test1 visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:test1$delegate type:kotlin.Lazy visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:test1$delegate type:kotlin.Lazy visibility:private [final,static] EXPRESSION_BODY CALL 'public final fun lazy (initializer: kotlin.Function0): kotlin.Lazy declared in kotlin' type=kotlin.Lazy origin=null : kotlin.Int @@ -15,7 +15,7 @@ FILE fqName: fileName:/delegatedProperties.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): T of kotlin.getValue [inline,operator] declared in kotlin' type=kotlin.Int origin=null : kotlin.Int - $receiver: GET_FIELD 'FIELD DELEGATE name:test1$delegate type:kotlin.Lazy visibility:private [final,static]' type=kotlin.Lazy origin=null + $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test1$delegate type:kotlin.Lazy visibility:private [final,static]' type=kotlin.Lazy origin=null thisRef: CONST Null type=kotlin.Nothing? value=null property: PROPERTY_REFERENCE 'public final test1: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any] @@ -37,7 +37,7 @@ FILE fqName: fileName:/delegatedProperties.kt GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:map type:kotlin.collections.MutableMap visibility:private [final]' type=kotlin.collections.MutableMap origin=null receiver: GET_VAR ': .C declared in .C.' type=.C origin=null PROPERTY name:test2 visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:test2$delegate type:kotlin.Lazy visibility:private [final] + FIELD PROPERTY_DELEGATE name:test2$delegate type:kotlin.Lazy visibility:private [final] EXPRESSION_BODY CALL 'public final fun lazy (initializer: kotlin.Function0): kotlin.Lazy declared in kotlin' type=kotlin.Lazy origin=null : kotlin.Int @@ -53,12 +53,12 @@ FILE fqName: fileName:/delegatedProperties.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .C' CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): T of kotlin.getValue [inline,operator] declared in kotlin' type=kotlin.Int origin=null : kotlin.Int - $receiver: GET_FIELD 'FIELD DELEGATE name:test2$delegate type:kotlin.Lazy visibility:private [final]' type=kotlin.Lazy origin=null + $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test2$delegate type:kotlin.Lazy visibility:private [final]' type=kotlin.Lazy origin=null receiver: GET_VAR ': .C declared in .C.' type=.C origin=null thisRef: GET_VAR ': .C declared in .C.' type=.C origin=null property: PROPERTY_REFERENCE 'public final test2: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in .C' setter=null type=kotlin.reflect.KProperty1<.C, kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE PROPERTY name:test3 visibility:public modality:FINAL [delegated,var] - FIELD DELEGATE name:test3$delegate type:kotlin.collections.MutableMap visibility:private [final] + FIELD PROPERTY_DELEGATE name:test3$delegate type:kotlin.collections.MutableMap visibility:private [final] EXPRESSION_BODY CALL 'public final fun (): kotlin.collections.MutableMap declared in .C' type=kotlin.collections.MutableMap origin=GET_PROPERTY $this: GET_VAR ': .C declared in .C' type=.C origin=null @@ -70,7 +70,7 @@ FILE fqName: fileName:/delegatedProperties.kt CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): V1 of kotlin.collections.getValue [inline,operator] declared in kotlin.collections' type=kotlin.Any origin=null : kotlin.Any : kotlin.Any - $receiver: GET_FIELD 'FIELD DELEGATE name:test3$delegate type:kotlin.collections.MutableMap visibility:private [final]' type=kotlin.collections.MutableMap origin=null + $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test3$delegate type:kotlin.collections.MutableMap visibility:private [final]' type=kotlin.collections.MutableMap origin=null receiver: GET_VAR ': .C declared in .C.' type=.C origin=null thisRef: GET_VAR ': .C declared in .C.' type=.C origin=null property: PROPERTY_REFERENCE 'public final test3: kotlin.Any [delegated,var]' field=null getter='public final fun (): kotlin.Any declared in .C' setter='public final fun (: kotlin.Any): kotlin.Unit declared in .C' type=kotlin.reflect.KMutableProperty1<.C, kotlin.Any> origin=PROPERTY_REFERENCE_FOR_DELEGATE @@ -82,7 +82,7 @@ FILE fqName: fileName:/delegatedProperties.kt RETURN type=kotlin.Nothing from='public final fun (: kotlin.Any): kotlin.Unit declared in .C' CALL 'public final fun setValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>, value: V of kotlin.collections.setValue): kotlin.Unit [inline,operator] declared in kotlin.collections' type=kotlin.Unit origin=null : kotlin.Any - $receiver: GET_FIELD 'FIELD DELEGATE name:test3$delegate type:kotlin.collections.MutableMap visibility:private [final]' type=kotlin.collections.MutableMap origin=null + $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test3$delegate type:kotlin.collections.MutableMap visibility:private [final]' type=kotlin.collections.MutableMap origin=null receiver: GET_VAR ': .C declared in .C.' type=.C origin=null thisRef: GET_VAR ': .C declared in .C.' type=.C origin=null property: PROPERTY_REFERENCE 'public final test3: kotlin.Any [delegated,var]' field=null getter='public final fun (): kotlin.Any declared in .C' setter='public final fun (: kotlin.Any): kotlin.Unit declared in .C' type=kotlin.reflect.KMutableProperty1<.C, kotlin.Any> origin=PROPERTY_REFERENCE_FOR_DELEGATE @@ -101,7 +101,7 @@ FILE fqName: fileName:/delegatedProperties.kt public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any PROPERTY name:test4 visibility:public modality:FINAL [delegated,var] - FIELD DELEGATE name:test4$delegate type:java.util.HashMap{ kotlin.collections.HashMap } visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:test4$delegate type:java.util.HashMap{ kotlin.collections.HashMap } visibility:private [final,static] EXPRESSION_BODY CALL 'public final fun hashMapOf (): java.util.HashMap{ kotlin.collections.HashMap } [inline] declared in kotlin.collections' type=java.util.HashMap{ kotlin.collections.HashMap } origin=null : kotlin.String @@ -113,7 +113,7 @@ FILE fqName: fileName:/delegatedProperties.kt CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): V1 of kotlin.collections.getValue [inline,operator] declared in kotlin.collections' type=kotlin.Any origin=null : kotlin.Any : kotlin.Any - $receiver: GET_FIELD 'FIELD DELEGATE name:test4$delegate type:java.util.HashMap{ kotlin.collections.HashMap } visibility:private [final,static]' type=java.util.HashMap{ kotlin.collections.HashMap } origin=null + $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test4$delegate type:java.util.HashMap{ kotlin.collections.HashMap } visibility:private [final,static]' type=java.util.HashMap{ kotlin.collections.HashMap } origin=null thisRef: CONST Null type=kotlin.Nothing? value=null property: PROPERTY_REFERENCE 'public final test4: kotlin.Any [delegated,var]' field=null getter='public final fun (): kotlin.Any declared in ' setter='public final fun (: kotlin.Any): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:kotlin.Any) returnType:kotlin.Unit @@ -123,7 +123,7 @@ FILE fqName: fileName:/delegatedProperties.kt RETURN type=kotlin.Nothing from='public final fun (: kotlin.Any): kotlin.Unit declared in ' CALL 'public final fun setValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>, value: V of kotlin.collections.setValue): kotlin.Unit [inline,operator] declared in kotlin.collections' type=kotlin.Unit origin=null : kotlin.Any - $receiver: GET_FIELD 'FIELD DELEGATE name:test4$delegate type:java.util.HashMap{ kotlin.collections.HashMap } visibility:private [final,static]' type=java.util.HashMap{ kotlin.collections.HashMap } origin=null + $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test4$delegate type:java.util.HashMap{ kotlin.collections.HashMap } visibility:private [final,static]' type=java.util.HashMap{ kotlin.collections.HashMap } origin=null thisRef: CONST Null type=kotlin.Nothing? value=null property: PROPERTY_REFERENCE 'public final test4: kotlin.Any [delegated,var]' field=null getter='public final fun (): kotlin.Any declared in ' setter='public final fun (: kotlin.Any): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE value: GET_VAR ': kotlin.Any declared in .' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt b/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt index e0cdaa15715..286fb22d417 100644 --- a/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt +++ b/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt @@ -2,7 +2,7 @@ FILE fqName: fileName:/localDelegatedProperties.kt FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY LOCAL_DELEGATED_PROPERTY name:x type:kotlin.Int flags:val - VAR DELEGATE name:x$delegate type:kotlin.Lazy [val] + VAR PROPERTY_DELEGATE name:x$delegate type:kotlin.Lazy [val] CALL 'public final fun lazy (initializer: kotlin.Function0): kotlin.Lazy declared in kotlin' type=kotlin.Lazy origin=null : kotlin.Int initializer: FUN_EXPR type=kotlin.Function0 origin=LAMBDA @@ -23,7 +23,7 @@ FILE fqName: fileName:/localDelegatedProperties.kt FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY LOCAL_DELEGATED_PROPERTY name:x type:kotlin.Int flags:var - VAR DELEGATE name:x$delegate type:java.util.HashMap{ kotlin.collections.HashMap } [val] + VAR PROPERTY_DELEGATE name:x$delegate type:java.util.HashMap{ kotlin.collections.HashMap } [val] CALL 'public final fun hashMapOf (): java.util.HashMap{ kotlin.collections.HashMap } [inline] declared in kotlin.collections' type=java.util.HashMap{ kotlin.collections.HashMap } origin=null : kotlin.String : kotlin.Int diff --git a/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.txt b/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.txt index 160fb15d397..603cd9283ed 100644 --- a/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.txt +++ b/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.txt @@ -63,7 +63,7 @@ FILE fqName: fileName:/packageLevelProperties.kt FUN name: visibility:public modality:FINAL <> () returnType:kotlin.Int correspondingProperty: PROPERTY name:test6 visibility:public modality:FINAL [val] PROPERTY name:test7 visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final,static] EXPRESSION_BODY CALL 'public final fun lazy (initializer: kotlin.Function0): kotlin.Lazy declared in kotlin' type=kotlin.Lazy origin=null : kotlin.Int @@ -77,11 +77,11 @@ FILE fqName: fileName:/packageLevelProperties.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): T of kotlin.getValue [inline,operator] declared in kotlin' type=kotlin.Int origin=null : kotlin.Int - $receiver: GET_FIELD 'FIELD DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final,static]' type=kotlin.Lazy origin=GET_PROPERTY + $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final,static]' type=kotlin.Lazy origin=GET_PROPERTY thisRef: CONST Null type=kotlin.Nothing? value=null - property: PROPERTY_REFERENCE 'public final test7: kotlin.Int [delegated,val]' field='FIELD DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=null + property: PROPERTY_REFERENCE 'public final test7: kotlin.Int [delegated,val]' field='FIELD PROPERTY_DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=null PROPERTY name:test8 visibility:public modality:FINAL [delegated,var] - FIELD DELEGATE name:test8$delegate type:java.util.HashMap visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:test8$delegate type:java.util.HashMap visibility:private [final,static] EXPRESSION_BODY CALL 'public final fun hashMapOf (): java.util.HashMap [inline] declared in kotlin.collections' type=java.util.HashMap origin=null : kotlin.String @@ -92,12 +92,12 @@ FILE fqName: fileName:/packageLevelProperties.kt RETURN type=kotlin.Nothing from='public final fun (): IrErrorType declared in ' ERROR_CALL 'Unresolved reference: #' type=IrErrorType CONST Null type=kotlin.Nothing? value=null - PROPERTY_REFERENCE 'public final test8: IrErrorType [delegated,var]' field='FIELD DELEGATE name:test8$delegate type:java.util.HashMap visibility:private [final,static]' getter='public final fun (): IrErrorType declared in ' setter='public final fun (: IrErrorType): kotlin.Unit declared in ' type=kotlin.reflect.KProperty<*> origin=null + PROPERTY_REFERENCE 'public final test8: IrErrorType [delegated,var]' field='FIELD PROPERTY_DELEGATE name:test8$delegate type:java.util.HashMap visibility:private [final,static]' getter='public final fun (): IrErrorType declared in ' setter='public final fun (: IrErrorType): kotlin.Unit declared in ' type=kotlin.reflect.KProperty<*> origin=null FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:IrErrorType) returnType:kotlin.Unit correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [delegated,var] VALUE_PARAMETER name: index:0 type:IrErrorType BLOCK_BODY ERROR_CALL 'Unresolved reference: #' type=IrErrorType CONST Null type=kotlin.Nothing? value=null - PROPERTY_REFERENCE 'public final test8: IrErrorType [delegated,var]' field='FIELD DELEGATE name:test8$delegate type:java.util.HashMap visibility:private [final,static]' getter='public final fun (): IrErrorType declared in ' setter='public final fun (: IrErrorType): kotlin.Unit declared in ' type=kotlin.reflect.KProperty<*> origin=null + PROPERTY_REFERENCE 'public final test8: IrErrorType [delegated,var]' field='FIELD PROPERTY_DELEGATE name:test8$delegate type:java.util.HashMap visibility:private [final,static]' getter='public final fun (): IrErrorType declared in ' setter='public final fun (: IrErrorType): kotlin.Unit declared in ' type=kotlin.reflect.KProperty<*> origin=null GET_VAR ': IrErrorType declared in .' type=IrErrorType origin=null diff --git a/compiler/testData/ir/irText/declarations/packageLevelProperties.txt b/compiler/testData/ir/irText/declarations/packageLevelProperties.txt index af95ac03dcb..5bf68601e77 100644 --- a/compiler/testData/ir/irText/declarations/packageLevelProperties.txt +++ b/compiler/testData/ir/irText/declarations/packageLevelProperties.txt @@ -69,7 +69,7 @@ FILE fqName: fileName:/packageLevelProperties.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test6 type:kotlin.Int visibility:private [final,static]' type=kotlin.Int origin=null PROPERTY name:test7 visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final,static] EXPRESSION_BODY CALL 'public final fun lazy (initializer: kotlin.Function0): kotlin.Lazy declared in kotlin' type=kotlin.Lazy origin=null : kotlin.Int @@ -84,11 +84,11 @@ FILE fqName: fileName:/packageLevelProperties.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): T of kotlin.getValue [inline,operator] declared in kotlin' type=kotlin.Int origin=null : kotlin.Int - $receiver: GET_FIELD 'FIELD DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final,static]' type=kotlin.Lazy origin=null + $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final,static]' type=kotlin.Lazy origin=null thisRef: CONST Null type=kotlin.Nothing? value=null property: PROPERTY_REFERENCE 'public final test7: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE PROPERTY name:test8 visibility:public modality:FINAL [delegated,var] - FIELD DELEGATE name:test8$delegate type:java.util.HashMap{ kotlin.collections.HashMap } visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:test8$delegate type:java.util.HashMap{ kotlin.collections.HashMap } visibility:private [final,static] EXPRESSION_BODY CALL 'public final fun hashMapOf (): java.util.HashMap{ kotlin.collections.HashMap } [inline] declared in kotlin.collections' type=java.util.HashMap{ kotlin.collections.HashMap } origin=null : kotlin.String @@ -100,7 +100,7 @@ FILE fqName: fileName:/packageLevelProperties.kt CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): V1 of kotlin.collections.getValue [inline,operator] declared in kotlin.collections' type=kotlin.Int origin=null : kotlin.Int : kotlin.Int - $receiver: GET_FIELD 'FIELD DELEGATE name:test8$delegate type:java.util.HashMap{ kotlin.collections.HashMap } visibility:private [final,static]' type=java.util.HashMap{ kotlin.collections.HashMap } origin=null + $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test8$delegate type:java.util.HashMap{ kotlin.collections.HashMap } visibility:private [final,static]' type=java.util.HashMap{ kotlin.collections.HashMap } origin=null thisRef: CONST Null type=kotlin.Nothing? value=null property: PROPERTY_REFERENCE 'public final test8: kotlin.Int [delegated,var]' field=null getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:kotlin.Int) returnType:kotlin.Unit @@ -110,7 +110,7 @@ FILE fqName: fileName:/packageLevelProperties.kt RETURN type=kotlin.Nothing from='public final fun (: kotlin.Int): kotlin.Unit declared in ' CALL 'public final fun setValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>, value: V of kotlin.collections.setValue): kotlin.Unit [inline,operator] declared in kotlin.collections' type=kotlin.Unit origin=null : kotlin.Int - $receiver: GET_FIELD 'FIELD DELEGATE name:test8$delegate type:java.util.HashMap{ kotlin.collections.HashMap } visibility:private [final,static]' type=java.util.HashMap{ kotlin.collections.HashMap } origin=null + $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test8$delegate type:java.util.HashMap{ kotlin.collections.HashMap } visibility:private [final,static]' type=java.util.HashMap{ kotlin.collections.HashMap } origin=null thisRef: CONST Null type=kotlin.Nothing? value=null property: PROPERTY_REFERENCE 'public final test8: kotlin.Int [delegated,var]' field=null getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE value: GET_VAR ': kotlin.Int declared in .' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.fir.txt b/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.fir.txt index 2ecbbd11a53..30372fadfe7 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.fir.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.fir.txt @@ -46,7 +46,7 @@ FILE fqName: fileName:/differentReceivers.kt RETURN type=kotlin.Nothing from='public final fun getValue (receiver: kotlin.Any?, p: kotlin.Any): kotlin.String [operator] declared in ' GET_VAR ': kotlin.String declared in .getValue' type=kotlin.String origin=null PROPERTY name:testO visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:testO$delegate type:kotlin.String visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:testO$delegate type:kotlin.String visibility:private [final,static] EXPRESSION_BODY CALL 'public final fun provideDelegate (host: kotlin.Any?, p: kotlin.Any): kotlin.String [operator] declared in ' type=kotlin.String origin=null $receiver: CONSTRUCTOR_CALL 'public constructor (value: kotlin.String) [primary] declared in .MyClass' type=.MyClass origin=null @@ -58,11 +58,11 @@ FILE fqName: fileName:/differentReceivers.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' CALL 'public final fun getValue (receiver: kotlin.Any?, p: kotlin.Any): kotlin.String [operator] declared in ' type=kotlin.String origin=null - $receiver: GET_FIELD 'FIELD DELEGATE name:testO$delegate type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=GET_PROPERTY + $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:testO$delegate type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=GET_PROPERTY receiver: CONST Null type=kotlin.Nothing? value=null - p: PROPERTY_REFERENCE 'public final testO: kotlin.String [delegated,val]' field='FIELD DELEGATE name:testO$delegate type:kotlin.String visibility:private [final,static]' getter='public final fun (): kotlin.String declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=null + p: PROPERTY_REFERENCE 'public final testO: kotlin.String [delegated,val]' field='FIELD PROPERTY_DELEGATE name:testO$delegate type:kotlin.String visibility:private [final,static]' getter='public final fun (): kotlin.String declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=null PROPERTY name:testK visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:testK$delegate type:kotlin.String visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:testK$delegate type:kotlin.String visibility:private [final,static] EXPRESSION_BODY CONST String type=kotlin.String value="K" FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String @@ -70,9 +70,9 @@ FILE fqName: fileName:/differentReceivers.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' CALL 'public final fun getValue (receiver: kotlin.Any?, p: kotlin.Any): kotlin.String [operator] declared in ' type=kotlin.String origin=null - $receiver: GET_FIELD 'FIELD DELEGATE name:testK$delegate type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=GET_PROPERTY + $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:testK$delegate type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=GET_PROPERTY receiver: CONST Null type=kotlin.Nothing? value=null - p: PROPERTY_REFERENCE 'public final testK: kotlin.String [delegated,val]' field='FIELD DELEGATE name:testK$delegate type:kotlin.String visibility:private [final,static]' getter='public final fun (): kotlin.String declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=null + p: PROPERTY_REFERENCE 'public final testK: kotlin.String [delegated,val]' field='FIELD PROPERTY_DELEGATE name:testK$delegate type:kotlin.String visibility:private [final,static]' getter='public final fun (): kotlin.String declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=null PROPERTY name:testOK visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:testOK type:kotlin.String visibility:private [final,static] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.txt b/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.txt index 4fd50440200..e18f3a05fa2 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.txt @@ -46,7 +46,7 @@ FILE fqName: fileName:/differentReceivers.kt RETURN type=kotlin.Nothing from='public final fun getValue (receiver: kotlin.Any?, p: kotlin.Any): kotlin.String [operator] declared in ' GET_VAR ': kotlin.String declared in .getValue' type=kotlin.String origin=null PROPERTY name:testO visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:testO$delegate type:kotlin.String visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:testO$delegate type:kotlin.String visibility:private [final,static] EXPRESSION_BODY CALL 'public final fun provideDelegate (host: kotlin.Any?, p: kotlin.Any): kotlin.String [operator] declared in ' type=kotlin.String origin=null $receiver: CONSTRUCTOR_CALL 'public constructor (value: kotlin.String) [primary] declared in .MyClass' type=.MyClass origin=null @@ -58,11 +58,11 @@ FILE fqName: fileName:/differentReceivers.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' CALL 'public final fun getValue (receiver: kotlin.Any?, p: kotlin.Any): kotlin.String [operator] declared in ' type=kotlin.String origin=null - $receiver: GET_FIELD 'FIELD DELEGATE name:testO$delegate type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=null + $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:testO$delegate type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=null receiver: CONST Null type=kotlin.Nothing? value=null p: PROPERTY_REFERENCE 'public final testO: kotlin.String [delegated,val]' field=null getter='public final fun (): kotlin.String declared in ' setter=null type=kotlin.reflect.KProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE PROPERTY name:testK visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:testK$delegate type:kotlin.String visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:testK$delegate type:kotlin.String visibility:private [final,static] EXPRESSION_BODY CONST String type=kotlin.String value="K" FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String @@ -70,7 +70,7 @@ FILE fqName: fileName:/differentReceivers.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' CALL 'public final fun getValue (receiver: kotlin.Any?, p: kotlin.Any): kotlin.String [operator] declared in ' type=kotlin.String origin=null - $receiver: GET_FIELD 'FIELD DELEGATE name:testK$delegate type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=null + $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:testK$delegate type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=null receiver: CONST Null type=kotlin.Nothing? value=null p: PROPERTY_REFERENCE 'public final testK: kotlin.String [delegated,val]' field=null getter='public final fun (): kotlin.String declared in ' setter=null type=kotlin.reflect.KProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE PROPERTY name:testOK visibility:public modality:FINAL [val] diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/local.txt b/compiler/testData/ir/irText/declarations/provideDelegate/local.txt index 20ea7256d8d..66c654b6e1e 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/local.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/local.txt @@ -81,7 +81,7 @@ FILE fqName: fileName:/local.kt FUN name:foo visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY LOCAL_DELEGATED_PROPERTY name:testMember type:kotlin.String flags:val - VAR DELEGATE name:testMember$delegate type:.Delegate [val] + VAR PROPERTY_DELEGATE name:testMember$delegate type:.Delegate [val] CALL 'public final fun provideDelegate (thisRef: kotlin.Any?, property: kotlin.Any?): .Delegate [operator] declared in .DelegateProvider' type=.Delegate origin=null $this: CONSTRUCTOR_CALL 'public constructor (value: kotlin.String) [primary] declared in .DelegateProvider' type=.DelegateProvider origin=null value: CONST String type=kotlin.String value="OK" diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.txt b/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.txt index d43f509bf75..ae3a509f73f 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.txt @@ -48,7 +48,7 @@ FILE fqName: fileName:/localDifferentReceivers.kt FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String BLOCK_BODY LOCAL_DELEGATED_PROPERTY name:testO type:kotlin.String flags:val - VAR DELEGATE name:testO$delegate type:kotlin.String [val] + VAR PROPERTY_DELEGATE name:testO$delegate type:kotlin.String [val] CALL 'public final fun provideDelegate (host: kotlin.Any?, p: kotlin.Any): kotlin.String [operator] declared in ' type=kotlin.String origin=null $receiver: CONSTRUCTOR_CALL 'public constructor (value: kotlin.String) [primary] declared in .MyClass' type=.MyClass origin=null value: CONST String type=kotlin.String value="O" @@ -62,7 +62,7 @@ FILE fqName: fileName:/localDifferentReceivers.kt receiver: CONST Null type=kotlin.Nothing? value=null p: LOCAL_DELEGATED_PROPERTY_REFERENCE 'val testO: kotlin.String by (...)' delegate='val testO$delegate: kotlin.String [val] declared in .box' getter='local final fun (): kotlin.String declared in .box' setter=null type=kotlin.reflect.KProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE LOCAL_DELEGATED_PROPERTY name:testK type:kotlin.String flags:val - VAR DELEGATE name:testK$delegate type:kotlin.String [val] + VAR PROPERTY_DELEGATE name:testK$delegate type:kotlin.String [val] CONST String type=kotlin.String value="K" FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:local modality:FINAL <> () returnType:kotlin.String BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/member.fir.txt b/compiler/testData/ir/irText/declarations/provideDelegate/member.fir.txt index 8cf3c846adf..440ae2e7937 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/member.fir.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/member.fir.txt @@ -85,7 +85,7 @@ FILE fqName: fileName:/member.kt DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]' PROPERTY name:testMember visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:testMember$delegate type:.Delegate visibility:private [final] + FIELD PROPERTY_DELEGATE name:testMember$delegate type:.Delegate visibility:private [final] EXPRESSION_BODY CALL 'public final fun provideDelegate (thisRef: kotlin.Any?, property: kotlin.Any?): .Delegate [operator] declared in .DelegateProvider' type=.Delegate origin=null $this: CONSTRUCTOR_CALL 'public constructor (value: kotlin.String) [primary] declared in .DelegateProvider' type=.DelegateProvider origin=null @@ -98,9 +98,9 @@ FILE fqName: fileName:/member.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in .Host' CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.Any?): kotlin.String [operator] declared in .Delegate' type=kotlin.String origin=null - $this: GET_FIELD 'FIELD DELEGATE name:testMember$delegate type:.Delegate visibility:private [final]' type=.Delegate origin=GET_PROPERTY + $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:testMember$delegate type:.Delegate visibility:private [final]' type=.Delegate origin=GET_PROPERTY thisRef: GET_VAR ': .Host declared in .Host' type=.Host origin=null - property: PROPERTY_REFERENCE 'public final testMember: kotlin.String [delegated,val]' field='FIELD DELEGATE name:testMember$delegate type:.Delegate visibility:private [final]' getter='public final fun (): kotlin.String declared in .Host' setter=null type=kotlin.reflect.KProperty<*> origin=null + property: PROPERTY_REFERENCE 'public final testMember: kotlin.String [delegated,val]' field='FIELD PROPERTY_DELEGATE name:testMember$delegate type:.Delegate visibility:private [final]' getter='public final fun (): kotlin.String declared in .Host' setter=null type=kotlin.reflect.KProperty<*> origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/member.txt b/compiler/testData/ir/irText/declarations/provideDelegate/member.txt index 4aa99bb7fef..b4f9f043d8c 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/member.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/member.txt @@ -85,7 +85,7 @@ FILE fqName: fileName:/member.kt DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]' PROPERTY name:testMember visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:testMember$delegate type:.Delegate visibility:private [final] + FIELD PROPERTY_DELEGATE name:testMember$delegate type:.Delegate visibility:private [final] EXPRESSION_BODY CALL 'public final fun provideDelegate (thisRef: kotlin.Any?, property: kotlin.Any?): .Delegate [operator] declared in .DelegateProvider' type=.Delegate origin=null $this: CONSTRUCTOR_CALL 'public constructor (value: kotlin.String) [primary] declared in .DelegateProvider' type=.DelegateProvider origin=null @@ -98,7 +98,7 @@ FILE fqName: fileName:/member.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in .Host' CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.Any?): kotlin.String [operator] declared in .Delegate' type=kotlin.String origin=null - $this: GET_FIELD 'FIELD DELEGATE name:testMember$delegate type:.Delegate visibility:private [final]' type=.Delegate origin=null + $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:testMember$delegate type:.Delegate visibility:private [final]' type=.Delegate origin=null receiver: GET_VAR ': .Host declared in .Host.' type=.Host origin=null thisRef: GET_VAR ': .Host declared in .Host.' type=.Host origin=null property: PROPERTY_REFERENCE 'public final testMember: kotlin.String [delegated,val]' field=null getter='public final fun (): kotlin.String declared in .Host' setter=null type=kotlin.reflect.KProperty1<.Host, kotlin.String> origin=PROPERTY_REFERENCE_FOR_DELEGATE diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.fir.txt b/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.fir.txt index bb0ec265a02..1dccd703f9c 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.fir.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.fir.txt @@ -56,7 +56,7 @@ FILE fqName: fileName:/memberExtension.kt CONSTRUCTOR_CALL 'public constructor (s: kotlin.String) [primary] declared in .Host.StringDelegate' type=.Host.StringDelegate origin=null s: GET_VAR ': kotlin.String declared in .Host.provideDelegate' type=kotlin.String origin=null PROPERTY name:plusK visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:plusK$delegate type:.Host.StringDelegate visibility:private [final] + FIELD PROPERTY_DELEGATE name:plusK$delegate type:.Host.StringDelegate visibility:private [final] EXPRESSION_BODY CALL 'public final fun provideDelegate (host: kotlin.Any?, p: kotlin.Any): .Host.StringDelegate [operator] declared in .Host' type=.Host.StringDelegate origin=null $this: GET_VAR ': .Host declared in .Host' type=.Host origin=null @@ -68,10 +68,10 @@ FILE fqName: fileName:/memberExtension.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in .Host' CALL 'public final fun getValue (receiver: kotlin.String, p: kotlin.Any): kotlin.String [operator] declared in .Host.StringDelegate' type=kotlin.String origin=null - $this: GET_FIELD 'FIELD DELEGATE name:plusK$delegate type:.Host.StringDelegate visibility:private [final]' type=.Host.StringDelegate origin=GET_PROPERTY + $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:plusK$delegate type:.Host.StringDelegate visibility:private [final]' type=.Host.StringDelegate origin=GET_PROPERTY receiver: GET_OBJECT 'CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Host receiver: ERROR_CALL 'Unresolved reference: this@R|/Host.plusK|' type=kotlin.String - p: PROPERTY_REFERENCE 'public final plusK: kotlin.String [delegated,val]' field='FIELD DELEGATE name:plusK$delegate type:.Host.StringDelegate visibility:private [final]' getter='public final fun (): kotlin.String declared in .Host' setter=null type=kotlin.reflect.KProperty<*> origin=null + p: PROPERTY_REFERENCE 'public final plusK: kotlin.String [delegated,val]' field='FIELD PROPERTY_DELEGATE name:plusK$delegate type:.Host.StringDelegate visibility:private [final]' getter='public final fun (): kotlin.String declared in .Host' setter=null type=kotlin.reflect.KProperty<*> origin=null PROPERTY name:ok visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:ok type:kotlin.String visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.txt b/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.txt index 4a253de3d64..80502c9aca9 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.txt @@ -56,7 +56,7 @@ FILE fqName: fileName:/memberExtension.kt CONSTRUCTOR_CALL 'public constructor (s: kotlin.String) [primary] declared in .Host.StringDelegate' type=.Host.StringDelegate origin=null s: GET_VAR ': kotlin.String declared in .Host.provideDelegate' type=kotlin.String origin=null PROPERTY name:plusK visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:plusK$delegate type:.Host.StringDelegate visibility:private [final] + FIELD PROPERTY_DELEGATE name:plusK$delegate type:.Host.StringDelegate visibility:private [final] EXPRESSION_BODY CALL 'public final fun provideDelegate (host: kotlin.Any?, p: kotlin.Any): .Host.StringDelegate [operator] declared in .Host' type=.Host.StringDelegate origin=null $this: GET_VAR ': .Host declared in .Host' type=.Host origin=null @@ -70,7 +70,7 @@ FILE fqName: fileName:/memberExtension.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in .Host' CALL 'public final fun getValue (receiver: kotlin.String, p: kotlin.Any): kotlin.String [operator] declared in .Host.StringDelegate' type=kotlin.String origin=null - $this: GET_FIELD 'FIELD DELEGATE name:plusK$delegate type:.Host.StringDelegate visibility:private [final]' type=.Host.StringDelegate origin=null + $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:plusK$delegate type:.Host.StringDelegate visibility:private [final]' type=.Host.StringDelegate origin=null receiver: GET_VAR ': .Host declared in .Host.' type=.Host origin=null receiver: GET_VAR ': kotlin.String declared in .Host.' type=kotlin.String origin=null p: PROPERTY_REFERENCE 'public final plusK: kotlin.String [delegated,val]' field=null getter='public final fun (): kotlin.String declared in .Host' setter=null type=kotlin.reflect.KProperty2.Host, kotlin.String> origin=PROPERTY_REFERENCE_FOR_DELEGATE diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/topLevel.fir.txt b/compiler/testData/ir/irText/declarations/provideDelegate/topLevel.fir.txt index b7dc6bac301..13adbb19c99 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/topLevel.fir.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/topLevel.fir.txt @@ -79,7 +79,7 @@ FILE fqName: fileName:/topLevel.kt public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any PROPERTY name:testTopLevel visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:testTopLevel$delegate type:.Delegate visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:testTopLevel$delegate type:.Delegate visibility:private [final,static] EXPRESSION_BODY CALL 'public final fun provideDelegate (thisRef: kotlin.Any?, property: kotlin.Any?): .Delegate [operator] declared in .DelegateProvider' type=.Delegate origin=null $this: CONSTRUCTOR_CALL 'public constructor (value: kotlin.String) [primary] declared in .DelegateProvider' type=.DelegateProvider origin=null @@ -91,6 +91,6 @@ FILE fqName: fileName:/topLevel.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.Any?): kotlin.String [operator] declared in .Delegate' type=kotlin.String origin=null - $this: GET_FIELD 'FIELD DELEGATE name:testTopLevel$delegate type:.Delegate visibility:private [final,static]' type=.Delegate origin=GET_PROPERTY + $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:testTopLevel$delegate type:.Delegate visibility:private [final,static]' type=.Delegate origin=GET_PROPERTY thisRef: CONST Null type=kotlin.Nothing? value=null - property: PROPERTY_REFERENCE 'public final testTopLevel: kotlin.String [delegated,val]' field='FIELD DELEGATE name:testTopLevel$delegate type:.Delegate visibility:private [final,static]' getter='public final fun (): kotlin.String declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=null + property: PROPERTY_REFERENCE 'public final testTopLevel: kotlin.String [delegated,val]' field='FIELD PROPERTY_DELEGATE name:testTopLevel$delegate type:.Delegate visibility:private [final,static]' getter='public final fun (): kotlin.String declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=null diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/topLevel.txt b/compiler/testData/ir/irText/declarations/provideDelegate/topLevel.txt index c4edafa0f99..ef6ef04f709 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/topLevel.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/topLevel.txt @@ -79,7 +79,7 @@ FILE fqName: fileName:/topLevel.kt public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any PROPERTY name:testTopLevel visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:testTopLevel$delegate type:.Delegate visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:testTopLevel$delegate type:.Delegate visibility:private [final,static] EXPRESSION_BODY CALL 'public final fun provideDelegate (thisRef: kotlin.Any?, property: kotlin.Any?): .Delegate [operator] declared in .DelegateProvider' type=.Delegate origin=null $this: CONSTRUCTOR_CALL 'public constructor (value: kotlin.String) [primary] declared in .DelegateProvider' type=.DelegateProvider origin=null @@ -91,6 +91,6 @@ FILE fqName: fileName:/topLevel.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.Any?): kotlin.String [operator] declared in .Delegate' type=kotlin.String origin=null - $this: GET_FIELD 'FIELD DELEGATE name:testTopLevel$delegate type:.Delegate visibility:private [final,static]' type=.Delegate origin=null + $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:testTopLevel$delegate type:.Delegate visibility:private [final,static]' type=.Delegate origin=null thisRef: CONST Null type=kotlin.Nothing? value=null property: PROPERTY_REFERENCE 'public final testTopLevel: kotlin.String [delegated,val]' field=null getter='public final fun (): kotlin.String declared in ' setter=null type=kotlin.reflect.KProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE diff --git a/compiler/testData/ir/irText/expressions/genericPropertyRef.fir.txt b/compiler/testData/ir/irText/expressions/genericPropertyRef.fir.txt index da2d6fe16f0..686dcebd356 100644 --- a/compiler/testData/ir/irText/expressions/genericPropertyRef.fir.txt +++ b/compiler/testData/ir/irText/expressions/genericPropertyRef.fir.txt @@ -65,7 +65,7 @@ FILE fqName: fileName:/genericPropertyRef.kt public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any PROPERTY name:additionalText visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:additionalText$delegate type:.DVal visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:additionalText$delegate type:.DVal visibility:private [final,static] EXPRESSION_BODY CONSTRUCTOR_CALL 'public constructor (kmember: kotlin.Any) [primary] declared in .DVal' type=.DVal origin=null kmember: PROPERTY_REFERENCE 'public final text: kotlin.String? [var]' field='FIELD PROPERTY_BACKING_FIELD name:text type:kotlin.String? visibility:private' getter='public final fun (): kotlin.String? declared in .Value' setter='public final fun (: kotlin.String?): kotlin.Unit declared in .Value' type=kotlin.reflect.KMutableProperty1<.Value>, kotlin.String?> origin=null @@ -74,11 +74,11 @@ FILE fqName: fileName:/genericPropertyRef.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' CALL 'public final fun getValue (t: kotlin.Any?, p: kotlin.Any): kotlin.Int [operator] declared in .DVal' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD DELEGATE name:additionalText$delegate type:.DVal visibility:private [final,static]' type=.DVal origin=GET_PROPERTY + $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:additionalText$delegate type:.DVal visibility:private [final,static]' type=.DVal origin=GET_PROPERTY t: CONST Null type=kotlin.Nothing? value=null - p: PROPERTY_REFERENCE 'public final additionalText: kotlin.Int [delegated,val]' field='FIELD DELEGATE name:additionalText$delegate type:.DVal visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=null + p: PROPERTY_REFERENCE 'public final additionalText: kotlin.Int [delegated,val]' field='FIELD PROPERTY_DELEGATE name:additionalText$delegate type:.DVal visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=null PROPERTY name:additionalValue visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:additionalValue$delegate type:.DVal visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:additionalValue$delegate type:.DVal visibility:private [final,static] EXPRESSION_BODY CONSTRUCTOR_CALL 'public constructor (kmember: kotlin.Any) [primary] declared in .DVal' type=.DVal origin=null kmember: PROPERTY_REFERENCE 'public final value: T of [var]' field=null getter='public final fun (): T of declared in .Value' setter='public final fun (: T of ): kotlin.Unit declared in .Value' type=kotlin.reflect.KMutableProperty1<.Value>, T of > origin=null @@ -87,9 +87,9 @@ FILE fqName: fileName:/genericPropertyRef.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' CALL 'public final fun getValue (t: kotlin.Any?, p: kotlin.Any): kotlin.Int [operator] declared in .DVal' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD DELEGATE name:additionalValue$delegate type:.DVal visibility:private [final,static]' type=.DVal origin=GET_PROPERTY + $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:additionalValue$delegate type:.DVal visibility:private [final,static]' type=.DVal origin=GET_PROPERTY t: CONST Null type=kotlin.Nothing? value=null - p: PROPERTY_REFERENCE 'public final additionalValue: kotlin.Int [delegated,val]' field='FIELD DELEGATE name:additionalValue$delegate type:.DVal visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=null + p: PROPERTY_REFERENCE 'public final additionalValue: kotlin.Int [delegated,val]' field='FIELD PROPERTY_DELEGATE name:additionalValue$delegate type:.DVal visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=null CLASS CLASS name:DVal modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.DVal CONSTRUCTOR visibility:public <> (kmember:kotlin.Any) returnType:.DVal [primary] diff --git a/compiler/testData/ir/irText/expressions/genericPropertyRef.txt b/compiler/testData/ir/irText/expressions/genericPropertyRef.txt index cdcf7724728..7c57187746c 100644 --- a/compiler/testData/ir/irText/expressions/genericPropertyRef.txt +++ b/compiler/testData/ir/irText/expressions/genericPropertyRef.txt @@ -65,7 +65,7 @@ FILE fqName: fileName:/genericPropertyRef.kt public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any PROPERTY name:additionalText visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:additionalText$delegate type:.DVal visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:additionalText$delegate type:.DVal visibility:private [final,static] EXPRESSION_BODY CONSTRUCTOR_CALL 'public constructor (kmember: kotlin.Any) [primary] declared in .DVal' type=.DVal origin=null kmember: PROPERTY_REFERENCE 'public final text: kotlin.String? [var]' field=null getter='public final fun (): kotlin.String? declared in .Value' setter='public final fun (: kotlin.String?): kotlin.Unit declared in .Value' type=kotlin.reflect.KMutableProperty1<.Value.>, kotlin.String?> origin=null @@ -76,12 +76,12 @@ FILE fqName: fileName:/genericPropertyRef.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' CALL 'public final fun getValue (t: kotlin.Any?, p: kotlin.Any): kotlin.Int [operator] declared in .DVal' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD DELEGATE name:additionalText$delegate type:.DVal visibility:private [final,static]' type=.DVal origin=null + $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:additionalText$delegate type:.DVal visibility:private [final,static]' type=.DVal origin=null t: GET_VAR ': .Value.> declared in .' type=.Value.> origin=null p: PROPERTY_REFERENCE 'public final additionalText: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty1<.Value.>, kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE <1>: PROPERTY name:additionalValue visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:additionalValue$delegate type:.DVal visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:additionalValue$delegate type:.DVal visibility:private [final,static] EXPRESSION_BODY CONSTRUCTOR_CALL 'public constructor (kmember: kotlin.Any) [primary] declared in .DVal' type=.DVal origin=null kmember: PROPERTY_REFERENCE 'public final value: T of .Value [var]' field=null getter='public final fun (): T of .Value declared in .Value' setter='public final fun (: T of .Value): kotlin.Unit declared in .Value' type=kotlin.reflect.KMutableProperty1<.Value.>, T of .> origin=null @@ -92,7 +92,7 @@ FILE fqName: fileName:/genericPropertyRef.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' CALL 'public final fun getValue (t: kotlin.Any?, p: kotlin.Any): kotlin.Int [operator] declared in .DVal' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD DELEGATE name:additionalValue$delegate type:.DVal visibility:private [final,static]' type=.DVal origin=null + $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:additionalValue$delegate type:.DVal visibility:private [final,static]' type=.DVal origin=null t: GET_VAR ': .Value.> declared in .' type=.Value.> origin=null p: PROPERTY_REFERENCE 'public final additionalValue: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty1<.Value.>, kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE <1>: diff --git a/compiler/testData/ir/irText/expressions/propertyReferences.fir.txt b/compiler/testData/ir/irText/expressions/propertyReferences.fir.txt index 9995fc74d03..a09c713cfbf 100644 --- a/compiler/testData/ir/irText/expressions/propertyReferences.fir.txt +++ b/compiler/testData/ir/irText/expressions/propertyReferences.fir.txt @@ -181,7 +181,7 @@ FILE fqName: fileName:/propertyReferences.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.reflect.KMutableProperty0 declared in ' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test_varWithAccessors type:kotlin.reflect.KMutableProperty0 visibility:private [final,static]' type=kotlin.reflect.KMutableProperty0 origin=null PROPERTY name:delegatedVal visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:delegatedVal$delegate type:.Delegate visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:delegatedVal$delegate type:.Delegate visibility:private [final,static] EXPRESSION_BODY GET_OBJECT 'CLASS OBJECT name:Delegate modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Delegate FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int @@ -189,20 +189,20 @@ FILE fqName: fileName:/propertyReferences.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' CALL 'public final fun getValue (thisRef: kotlin.Any?, kProp: kotlin.Any): kotlin.Int [operator] declared in .Delegate' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD DELEGATE name:delegatedVal$delegate type:.Delegate visibility:private [final,static]' type=.Delegate origin=GET_PROPERTY + $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:delegatedVal$delegate type:.Delegate visibility:private [final,static]' type=.Delegate origin=GET_PROPERTY thisRef: CONST Null type=kotlin.Nothing? value=null - kProp: PROPERTY_REFERENCE 'public final delegatedVal: kotlin.Int [delegated,val]' field='FIELD DELEGATE name:delegatedVal$delegate type:.Delegate visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=null + kProp: PROPERTY_REFERENCE 'public final delegatedVal: kotlin.Int [delegated,val]' field='FIELD PROPERTY_DELEGATE name:delegatedVal$delegate type:.Delegate visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=null PROPERTY name:test_delegatedVal visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:test_delegatedVal type:kotlin.reflect.KProperty0 visibility:private [final,static] EXPRESSION_BODY - PROPERTY_REFERENCE 'public final delegatedVal: kotlin.Int [delegated,val]' field='FIELD DELEGATE name:delegatedVal$delegate type:.Delegate visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty0 origin=null + PROPERTY_REFERENCE 'public final delegatedVal: kotlin.Int [delegated,val]' field='FIELD PROPERTY_DELEGATE name:delegatedVal$delegate type:.Delegate visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty0 origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.reflect.KProperty0 correspondingProperty: PROPERTY name:test_delegatedVal visibility:public modality:FINAL [val] BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.reflect.KProperty0 declared in ' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test_delegatedVal type:kotlin.reflect.KProperty0 visibility:private [final,static]' type=kotlin.reflect.KProperty0 origin=null PROPERTY name:delegatedVar visibility:public modality:FINAL [delegated,var] - FIELD DELEGATE name:delegatedVar$delegate type:.Delegate visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:delegatedVar$delegate type:.Delegate visibility:private [final,static] EXPRESSION_BODY GET_OBJECT 'CLASS OBJECT name:Delegate modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Delegate FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int @@ -210,22 +210,22 @@ FILE fqName: fileName:/propertyReferences.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' CALL 'public final fun getValue (thisRef: kotlin.Any?, kProp: kotlin.Any): kotlin.Int [operator] declared in .Delegate' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD DELEGATE name:delegatedVar$delegate type:.Delegate visibility:private [final,static]' type=.Delegate origin=GET_PROPERTY + $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:delegatedVar$delegate type:.Delegate visibility:private [final,static]' type=.Delegate origin=GET_PROPERTY thisRef: CONST Null type=kotlin.Nothing? value=null - kProp: PROPERTY_REFERENCE 'public final delegatedVar: kotlin.Int [delegated,var]' field='FIELD DELEGATE name:delegatedVar$delegate type:.Delegate visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KProperty<*> origin=null + kProp: PROPERTY_REFERENCE 'public final delegatedVar: kotlin.Int [delegated,var]' field='FIELD PROPERTY_DELEGATE name:delegatedVar$delegate type:.Delegate visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KProperty<*> origin=null FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:kotlin.Int) returnType:kotlin.Unit correspondingProperty: PROPERTY name:delegatedVar visibility:public modality:FINAL [delegated,var] VALUE_PARAMETER name: index:0 type:kotlin.Int BLOCK_BODY CALL 'public final fun setValue (thisRef: kotlin.Any?, kProp: kotlin.Any, value: kotlin.Int): kotlin.Unit [operator] declared in .Delegate' type=kotlin.Unit origin=null - $this: GET_FIELD 'FIELD DELEGATE name:delegatedVar$delegate type:.Delegate visibility:private [final,static]' type=.Delegate origin=GET_PROPERTY + $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:delegatedVar$delegate type:.Delegate visibility:private [final,static]' type=.Delegate origin=GET_PROPERTY thisRef: CONST Null type=kotlin.Nothing? value=null - kProp: PROPERTY_REFERENCE 'public final delegatedVar: kotlin.Int [delegated,var]' field='FIELD DELEGATE name:delegatedVar$delegate type:.Delegate visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KProperty<*> origin=null + kProp: PROPERTY_REFERENCE 'public final delegatedVar: kotlin.Int [delegated,var]' field='FIELD PROPERTY_DELEGATE name:delegatedVar$delegate type:.Delegate visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KProperty<*> origin=null value: GET_VAR ': kotlin.Int declared in .' type=kotlin.Int origin=null PROPERTY name:test_delegatedVar visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:test_delegatedVar type:kotlin.reflect.KMutableProperty0 visibility:private [final,static] EXPRESSION_BODY - PROPERTY_REFERENCE 'public final delegatedVar: kotlin.Int [delegated,var]' field='FIELD DELEGATE name:delegatedVar$delegate type:.Delegate visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0 origin=null + PROPERTY_REFERENCE 'public final delegatedVar: kotlin.Int [delegated,var]' field='FIELD PROPERTY_DELEGATE name:delegatedVar$delegate type:.Delegate visibility:private [final,static]' getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0 origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.reflect.KMutableProperty0 correspondingProperty: PROPERTY name:test_delegatedVar visibility:public modality:FINAL [val] BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/propertyReferences.txt b/compiler/testData/ir/irText/expressions/propertyReferences.txt index 6c872d72158..88938f937dc 100644 --- a/compiler/testData/ir/irText/expressions/propertyReferences.txt +++ b/compiler/testData/ir/irText/expressions/propertyReferences.txt @@ -189,7 +189,7 @@ FILE fqName: fileName:/propertyReferences.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.reflect.KMutableProperty0 declared in ' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test_varWithAccessors type:kotlin.reflect.KMutableProperty0 visibility:private [final,static]' type=kotlin.reflect.KMutableProperty0 origin=null PROPERTY name:delegatedVal visibility:public modality:FINAL [delegated,val] - FIELD DELEGATE name:delegatedVal$delegate type:.Delegate visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:delegatedVal$delegate type:.Delegate visibility:private [final,static] EXPRESSION_BODY GET_OBJECT 'CLASS OBJECT name:Delegate modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Delegate FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int @@ -197,7 +197,7 @@ FILE fqName: fileName:/propertyReferences.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' CALL 'public final fun getValue (thisRef: kotlin.Any?, kProp: kotlin.Any): kotlin.Int [operator] declared in .Delegate' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD DELEGATE name:delegatedVal$delegate type:.Delegate visibility:private [final,static]' type=.Delegate origin=null + $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:delegatedVal$delegate type:.Delegate visibility:private [final,static]' type=.Delegate origin=null thisRef: CONST Null type=kotlin.Nothing? value=null kProp: PROPERTY_REFERENCE 'public final delegatedVal: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE PROPERTY name:test_delegatedVal visibility:public modality:FINAL [val] @@ -210,7 +210,7 @@ FILE fqName: fileName:/propertyReferences.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.reflect.KProperty0 declared in ' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test_delegatedVal type:kotlin.reflect.KProperty0 visibility:private [final,static]' type=kotlin.reflect.KProperty0 origin=null PROPERTY name:delegatedVar visibility:public modality:FINAL [delegated,var] - FIELD DELEGATE name:delegatedVar$delegate type:.Delegate visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:delegatedVar$delegate type:.Delegate visibility:private [final,static] EXPRESSION_BODY GET_OBJECT 'CLASS OBJECT name:Delegate modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Delegate FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int @@ -218,7 +218,7 @@ FILE fqName: fileName:/propertyReferences.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' CALL 'public final fun getValue (thisRef: kotlin.Any?, kProp: kotlin.Any): kotlin.Int [operator] declared in .Delegate' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD DELEGATE name:delegatedVar$delegate type:.Delegate visibility:private [final,static]' type=.Delegate origin=null + $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:delegatedVar$delegate type:.Delegate visibility:private [final,static]' type=.Delegate origin=null thisRef: CONST Null type=kotlin.Nothing? value=null kProp: PROPERTY_REFERENCE 'public final delegatedVar: kotlin.Int [delegated,var]' field=null getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:kotlin.Int) returnType:kotlin.Unit @@ -227,7 +227,7 @@ FILE fqName: fileName:/propertyReferences.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (: kotlin.Int): kotlin.Unit declared in ' CALL 'public final fun setValue (thisRef: kotlin.Any?, kProp: kotlin.Any, value: kotlin.Int): kotlin.Unit [operator] declared in .Delegate' type=kotlin.Unit origin=null - $this: GET_FIELD 'FIELD DELEGATE name:delegatedVar$delegate type:.Delegate visibility:private [final,static]' type=.Delegate origin=null + $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:delegatedVar$delegate type:.Delegate visibility:private [final,static]' type=.Delegate origin=null thisRef: CONST Null type=kotlin.Nothing? value=null kProp: PROPERTY_REFERENCE 'public final delegatedVar: kotlin.Int [delegated,var]' field=null getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE value: GET_VAR ': kotlin.Int declared in .' type=kotlin.Int origin=null