FIR2IR: support fake overridden properties

This commit is contained in:
Mikhail Glukhikh
2019-09-02 18:04:56 +03:00
parent 687db20029
commit 5386cfe254
48 changed files with 950 additions and 189 deletions
@@ -157,6 +157,18 @@ FILE fqName:<root> fileName:/classesWithAnnotations.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum
PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [val]
FUN FAKE_OVERRIDE name:<get-name> visibility:public modality:FINAL <> ($this:<root>.TestEnum) returnType:kotlin.String
correspondingProperty: PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [val]
overridden:
public final fun <get-name> (): kotlin.String declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum
PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [val]
FUN FAKE_OVERRIDE name:<get-ordinal> visibility:public modality:FINAL <> ($this:<root>.TestEnum) returnType:kotlin.Int
correspondingProperty: PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [val]
overridden:
public final fun <get-ordinal> (): kotlin.Int declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum
CLASS ANNOTATION_CLASS name:TestAnnotation modality:FINAL visibility:public superTypes:[kotlin.Annotation]
annotations:
TestAnn(x = 'annotation')
@@ -32,4 +32,4 @@ FILE fqName:<root> fileName:/delegateFieldWithAnnotations.kt
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
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='public final fun <get-test1> (): kotlin.Int declared in <root>' setter=null type=kotlin.reflect.KProperty<*> origin=null
@@ -97,7 +97,7 @@ FILE fqName:<root> fileName:/delegatedPropertyAccessorsWithAnnotations.kt
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
kProp: PROPERTY_REFERENCE 'public final test1: kotlin.Int [delegated,val]' field='FIELD DELEGATE name:test1$delegate type:<root>.Cell visibility:private [final,static]' getter='public final fun <get-test1> (): kotlin.Int declared in <root>' setter=null type=kotlin.reflect.KProperty<*> origin=null
PROPERTY name:test2 visibility:public modality:FINAL [delegated,var]
annotations:
A(x = 'test2.get')
@@ -114,7 +114,7 @@ FILE fqName:<root> fileName:/delegatedPropertyAccessorsWithAnnotations.kt
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
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='public final fun <set-test2> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' 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:kotlin.Int
@@ -122,5 +122,5 @@ FILE fqName:<root> fileName:/delegatedPropertyAccessorsWithAnnotations.kt
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
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='public final fun <set-test2> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.reflect.KProperty<*> origin=null
newValue: GET_VAR '<set-?>: kotlin.Int declared in <root>.<set-test2>' type=kotlin.Int origin=null
@@ -109,3 +109,15 @@ FILE fqName:<root> fileName:/enumEntriesWithAnnotations.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum
PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [val]
FUN FAKE_OVERRIDE name:<get-name> visibility:public modality:FINAL <> ($this:<root>.TestEnum) returnType:kotlin.String
correspondingProperty: PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [val]
overridden:
public final fun <get-name> (): kotlin.String declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum
PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [val]
FUN FAKE_OVERRIDE name:<get-ordinal> visibility:public modality:FINAL <> ($this:<root>.TestEnum) returnType:kotlin.Int
correspondingProperty: PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [val]
overridden:
public final fun <get-ordinal> (): kotlin.Int declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum
@@ -104,6 +104,18 @@ FILE fqName:<root> fileName:/enumsInAnnotationArguments.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum
PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [val]
FUN FAKE_OVERRIDE name:<get-name> visibility:public modality:FINAL <> ($this:<root>.En) returnType:kotlin.String
correspondingProperty: PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [val]
overridden:
public final fun <get-name> (): kotlin.String declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:<root>.En
PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [val]
FUN FAKE_OVERRIDE name:<get-ordinal> visibility:public modality:FINAL <> ($this:<root>.En) returnType:kotlin.Int
correspondingProperty: PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [val]
overridden:
public final fun <get-ordinal> (): kotlin.Int declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:<root>.En
CLASS ANNOTATION_CLASS name:TestAnn modality:FINAL visibility:public superTypes:[kotlin.Annotation]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestAnn
CONSTRUCTOR visibility:public <> (x:<root>.En) returnType:<root>.TestAnn [primary]