FIR2IR: change backing field visibility to private

This commit is contained in:
Mikhail Glukhikh
2019-08-29 14:22:24 +03:00
parent 271c15114c
commit bd5e1aeef5
141 changed files with 831 additions and 910 deletions
@@ -7,7 +7,7 @@ FILE fqName:<root> fileName:/differentReceivers.kt
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyClass modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:value visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.String visibility:public [final]
FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.String visibility:private [final]
EXPRESSION_BODY
GET_VAR 'value: kotlin.String declared in <root>.MyClass.<init>' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-value> visibility:public modality:FINAL <> ($this:<root>.MyClass) returnType:kotlin.String
@@ -15,7 +15,7 @@ FILE fqName:<root> fileName:/differentReceivers.kt
$this: VALUE_PARAMETER name:<this> type:<root>.MyClass
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-value> (): kotlin.String declared in <root>.MyClass'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.String visibility:public [final]' type=kotlin.String origin=null
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.MyClass declared in <root>.MyClass.<get-value>' type=<root>.MyClass origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
overridden:
@@ -74,7 +74,7 @@ FILE fqName:<root> fileName:/differentReceivers.kt
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=null 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:public [final,static]
FIELD PROPERTY_BACKING_FIELD name:testOK type:kotlin.String visibility:private [final,static]
EXPRESSION_BODY
CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null
$this: CALL 'public final fun <get-testO> (): kotlin.String declared in <root>' type=kotlin.String origin=null
@@ -83,4 +83,5 @@ FILE fqName:<root> fileName:/differentReceivers.kt
correspondingProperty: PROPERTY name:testOK visibility:public modality:FINAL [val]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-testOK> (): kotlin.String declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:testOK type:kotlin.String visibility:public [final,static]' type=kotlin.String origin=null
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:testOK type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=null
@@ -7,7 +7,7 @@ FILE fqName:<root> fileName:/local.kt
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Delegate modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:value visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.String visibility:public [final]
FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.String visibility:private [final]
EXPRESSION_BODY
GET_VAR 'value: kotlin.String declared in <root>.Delegate.<init>' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-value> visibility:public modality:FINAL <> ($this:<root>.Delegate) returnType:kotlin.String
@@ -15,7 +15,7 @@ FILE fqName:<root> fileName:/local.kt
$this: VALUE_PARAMETER name:<this> type:<root>.Delegate
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-value> (): kotlin.String declared in <root>.Delegate'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.String visibility:public [final]' type=kotlin.String origin=null
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.Delegate declared in <root>.Delegate.<get-value>' type=<root>.Delegate origin=null
FUN name:getValue visibility:public modality:FINAL <> ($this:<root>.Delegate, thisRef:kotlin.Any?, property:kotlin.Any?) returnType:kotlin.String
$this: VALUE_PARAMETER name:<this> type:<root>.Delegate
@@ -46,7 +46,7 @@ FILE fqName:<root> fileName:/local.kt
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:DelegateProvider modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:value visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.String visibility:public [final]
FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.String visibility:private [final]
EXPRESSION_BODY
GET_VAR 'value: kotlin.String declared in <root>.DelegateProvider.<init>' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-value> visibility:public modality:FINAL <> ($this:<root>.DelegateProvider) returnType:kotlin.String
@@ -54,7 +54,7 @@ FILE fqName:<root> fileName:/local.kt
$this: VALUE_PARAMETER name:<this> type:<root>.DelegateProvider
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-value> (): kotlin.String declared in <root>.DelegateProvider'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.String visibility:public [final]' type=kotlin.String origin=null
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.DelegateProvider declared in <root>.DelegateProvider.<get-value>' type=<root>.DelegateProvider origin=null
FUN name:provideDelegate visibility:public modality:FINAL <> ($this:<root>.DelegateProvider, thisRef:kotlin.Any?, property:kotlin.Any?) returnType:<root>.Delegate
$this: VALUE_PARAMETER name:<this> type:<root>.DelegateProvider
@@ -7,7 +7,7 @@ FILE fqName:<root> fileName:/localDifferentReceivers.kt
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyClass modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:value visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.String visibility:public [final]
FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.String visibility:private [final]
EXPRESSION_BODY
GET_VAR 'value: kotlin.String declared in <root>.MyClass.<init>' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-value> visibility:public modality:FINAL <> ($this:<root>.MyClass) returnType:kotlin.String
@@ -15,7 +15,7 @@ FILE fqName:<root> fileName:/localDifferentReceivers.kt
$this: VALUE_PARAMETER name:<this> type:<root>.MyClass
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-value> (): kotlin.String declared in <root>.MyClass'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.String visibility:public [final]' type=kotlin.String origin=null
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.MyClass declared in <root>.MyClass.<get-value>' type=<root>.MyClass origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
overridden:
@@ -13,7 +13,7 @@ FILE fqName:<root> fileName:/memberExtension.kt
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:StringDelegate modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:s visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:public [final]
FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private [final]
EXPRESSION_BODY
GET_VAR 's: kotlin.String declared in <root>.Host.StringDelegate.<init>' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-s> visibility:public modality:FINAL <> ($this:<root>.Host.StringDelegate) returnType:kotlin.String
@@ -21,7 +21,7 @@ FILE fqName:<root> fileName:/memberExtension.kt
$this: VALUE_PARAMETER name:<this> type:<root>.Host.StringDelegate
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-s> (): kotlin.String declared in <root>.Host.StringDelegate'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:public [final]' type=kotlin.String origin=null
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.Host.StringDelegate declared in <root>.Host.StringDelegate.<get-s>' type=<root>.Host.StringDelegate origin=null
FUN name:getValue visibility:public modality:FINAL <> ($this:<root>.Host.StringDelegate, receiver:kotlin.String, p:kotlin.Any) returnType:kotlin.String
$this: VALUE_PARAMETER name:<this> type:<root>.Host.StringDelegate
@@ -71,7 +71,7 @@ FILE fqName:<root> fileName:/memberExtension.kt
GET_VAR '<this>: <root>.Host declared in <root>.Host' type=<root>.Host origin=null
PROPERTY_REFERENCE 'public final plusK: IrErrorType [delegated,val]' field='FIELD DELEGATE name:plusK$delegate type:<root>.Host.StringDelegate visibility:private [final]' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null
PROPERTY name:ok visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:ok type:IrErrorType visibility:public [final]
FIELD PROPERTY_BACKING_FIELD name:ok type:IrErrorType visibility:private [final]
EXPRESSION_BODY
CALL 'public final fun <get-plusK> (): IrErrorType declared in <root>.Host' type=IrErrorType origin=null
$this: GET_VAR '<this>: <root>.Host declared in <root>.Host' type=<root>.Host origin=null
@@ -80,7 +80,7 @@ FILE fqName:<root> fileName:/memberExtension.kt
$this: VALUE_PARAMETER name:<this> type:<root>.Host
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-ok> (): IrErrorType declared in <root>.Host'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:ok type:IrErrorType visibility:public [final]' type=IrErrorType origin=null
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:ok type:IrErrorType visibility:private [final]' type=IrErrorType origin=null
receiver: GET_VAR '<this>: <root>.Host declared in <root>.Host.<get-ok>' type=<root>.Host origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
overridden:
@@ -7,7 +7,7 @@ FILE fqName:<root> fileName:/topLevel.kt
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Delegate modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:value visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.String visibility:public [final]
FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.String visibility:private [final]
EXPRESSION_BODY
GET_VAR 'value: kotlin.String declared in <root>.Delegate.<init>' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-value> visibility:public modality:FINAL <> ($this:<root>.Delegate) returnType:kotlin.String
@@ -15,7 +15,7 @@ FILE fqName:<root> fileName:/topLevel.kt
$this: VALUE_PARAMETER name:<this> type:<root>.Delegate
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-value> (): kotlin.String declared in <root>.Delegate'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.String visibility:public [final]' type=kotlin.String origin=null
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.Delegate declared in <root>.Delegate.<get-value>' type=<root>.Delegate origin=null
FUN name:getValue visibility:public modality:FINAL <> ($this:<root>.Delegate, thisRef:kotlin.Any?, property:kotlin.Any?) returnType:kotlin.String
$this: VALUE_PARAMETER name:<this> type:<root>.Delegate
@@ -46,7 +46,7 @@ FILE fqName:<root> fileName:/topLevel.kt
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:DelegateProvider modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:value visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.String visibility:public [final]
FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.String visibility:private [final]
EXPRESSION_BODY
GET_VAR 'value: kotlin.String declared in <root>.DelegateProvider.<init>' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-value> visibility:public modality:FINAL <> ($this:<root>.DelegateProvider) returnType:kotlin.String
@@ -54,7 +54,7 @@ FILE fqName:<root> fileName:/topLevel.kt
$this: VALUE_PARAMETER name:<this> type:<root>.DelegateProvider
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-value> (): kotlin.String declared in <root>.DelegateProvider'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.String visibility:public [final]' type=kotlin.String origin=null
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.DelegateProvider declared in <root>.DelegateProvider.<get-value>' type=<root>.DelegateProvider origin=null
FUN name:provideDelegate visibility:public modality:FINAL <> ($this:<root>.DelegateProvider, thisRef:kotlin.Any?, property:kotlin.Any?) returnType:<root>.Delegate
$this: VALUE_PARAMETER name:<this> type:<root>.DelegateProvider