FIR: partial implementation of delegate resolve #KT-32217 Fixed
This commit is contained in:
+13
-5
@@ -18,10 +18,18 @@ FILE fqName:<root> fileName:/delegateFieldWithAnnotations.kt
|
||||
PROPERTY name:test1 visibility:public modality:FINAL [delegated,val]
|
||||
annotations:
|
||||
Ann
|
||||
FIELD PROPERTY_BACKING_FIELD name:test1 type:IrErrorType visibility:public [final,static]
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:IrErrorType
|
||||
FIELD DELEGATE name:test1$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
CALL 'public final fun lazy (initializer: kotlin.Function0<T of <uninitialized parent>>): kotlin.Lazy<T of <uninitialized parent>> declared in kotlin' type=kotlin.Lazy<kotlin.Int> origin=null
|
||||
initializer: FUN_EXPR type=kotlin.Function0<kotlin.Int> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Int
|
||||
BLOCK_BODY
|
||||
CONST Int type=kotlin.Int value=42
|
||||
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:kotlin.Int
|
||||
correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [delegated,val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test1> (): IrErrorType declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1 type:IrErrorType visibility:public [final,static] ' type=IrErrorType origin=null
|
||||
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test1> (): kotlin.Int declared in <root>'
|
||||
CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): T of <uninitialized parent> [inline] declared in kotlin' type=kotlin.Int origin=null
|
||||
$receiver: GET_FIELD 'FIELD DELEGATE name:test1$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final,static] ' type=kotlin.Lazy<kotlin.Int> 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<kotlin.Int> visibility:private [final,static] ' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null
|
||||
|
||||
+27
-13
@@ -84,27 +84,41 @@ FILE fqName:<root> fileName:/delegatedPropertyAccessorsWithAnnotations.kt
|
||||
PROPERTY name:test1 visibility:public modality:FINAL [delegated,val]
|
||||
annotations:
|
||||
A(x = 'test1.get')
|
||||
FIELD PROPERTY_BACKING_FIELD name:test1 type:IrErrorType visibility:public [final,static]
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:IrErrorType
|
||||
FIELD DELEGATE name:test1$delegate type:<root>.Cell visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (value: kotlin.Int) [primary] declared in <root>.Cell' type=<root>.Cell origin=null
|
||||
value: CONST Int type=kotlin.Int value=1
|
||||
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:kotlin.Int
|
||||
correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [delegated,val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test1> (): IrErrorType declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1 type:IrErrorType visibility:public [final,static] ' type=IrErrorType origin=null
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test1> (): kotlin.Int declared in <root>'
|
||||
CALL 'public final fun getValue (thisRef: kotlin.Any?, kProp: kotlin.Any?): kotlin.Int declared in <root>.Cell' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:test1$delegate type:<root>.Cell visibility:private [final,static] ' type=<root>.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:<root>.Cell visibility:private [final,static] ' getter=null 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 PROPERTY_BACKING_FIELD name:test2 type:IrErrorType visibility:public [static]
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:IrErrorType
|
||||
FIELD DELEGATE name:test2$delegate type:<root>.Cell visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (value: kotlin.Int) [primary] declared in <root>.Cell' type=<root>.Cell origin=null
|
||||
value: CONST Int type=kotlin.Int value=2
|
||||
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:kotlin.Int
|
||||
correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [delegated,var]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test2> (): IrErrorType declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:IrErrorType visibility:public [static] ' type=IrErrorType origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-test2> visibility:public modality:FINAL <> (<set-?>:IrErrorType) returnType:kotlin.Unit
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test2> (): kotlin.Int declared in <root>'
|
||||
CALL 'public final fun getValue (thisRef: kotlin.Any?, kProp: kotlin.Any?): kotlin.Int declared in <root>.Cell' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:test2$delegate type:<root>.Cell visibility:private [final,static] ' type=<root>.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:<root>.Cell visibility:private [final,static] ' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null
|
||||
FUN DELEGATED_PROPERTY_ACCESSOR name:<set-test2> visibility:public modality:FINAL <> (<set-?>:kotlin.Int) returnType:kotlin.Unit
|
||||
correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [delegated,var]
|
||||
VALUE_PARAMETER name:<set-?> index:0 type:IrErrorType
|
||||
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:IrErrorType visibility:public [static] ' type=kotlin.Unit origin=null
|
||||
value: GET_VAR '<set-?>: IrErrorType declared in <root>.<set-test2>' type=IrErrorType origin=null
|
||||
|
||||
CALL 'public final fun setValue (thisRef: kotlin.Any?, kProp: kotlin.Any?, newValue: kotlin.Int): kotlin.Unit declared in <root>.Cell' type=kotlin.Unit origin=null
|
||||
$this: GET_FIELD 'FIELD DELEGATE name:test2$delegate type:<root>.Cell visibility:private [final,static] ' type=<root>.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:<root>.Cell visibility:private [final,static] ' getter='public final fun <get-test2> (): kotlin.Int declared in <root>' setter=null type=kotlin.reflect.KProperty<*> origin=null
|
||||
newValue: GET_VAR '<set-?>: kotlin.Int declared in <root>.<set-test2>' type=kotlin.Int origin=null
|
||||
|
||||
compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.fir.txt
Vendored
+1
-2
@@ -30,5 +30,4 @@ FILE fqName:<root> fileName:/localDelegatedPropertiesWithAnnotations.kt
|
||||
FUN name:foo visibility:public modality:FINAL <> (m:kotlin.collections.Map<kotlin.String, kotlin.Int>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:m index:0 type:kotlin.collections.Map<kotlin.String, kotlin.Int>
|
||||
BLOCK_BODY
|
||||
VAR name:test type:IrErrorType [val]
|
||||
|
||||
VAR name:test type:kotlin.Int [val]
|
||||
|
||||
Reference in New Issue
Block a user