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
@@ -10,7 +10,7 @@ FILE fqName:<root> fileName:/constructor.kt
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test1 modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:x visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:x type:T1 of <root>.Test1 visibility:public [final]
FIELD PROPERTY_BACKING_FIELD name:x type:T1 of <root>.Test1 visibility:private [final]
EXPRESSION_BODY
GET_VAR 'x: T1 of <uninitialized parent> declared in <root>.Test1.<init>' type=T1 of <uninitialized parent> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> ($this:<root>.Test1) returnType:T1 of <root>.Test1
@@ -18,10 +18,10 @@ FILE fqName:<root> fileName:/constructor.kt
$this: VALUE_PARAMETER name:<this> type:<root>.Test1
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-x> (): T1 of <root>.Test1 declared in <root>.Test1'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T1 of <root>.Test1 visibility:public [final]' type=T1 of <root>.Test1 origin=null
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T1 of <root>.Test1 visibility:private [final]' type=T1 of <root>.Test1 origin=null
receiver: GET_VAR '<this>: <root>.Test1 declared in <root>.Test1.<get-x>' type=<root>.Test1 origin=null
PROPERTY name:y visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:y type:T2 of <root>.Test1 visibility:public [final]
FIELD PROPERTY_BACKING_FIELD name:y type:T2 of <root>.Test1 visibility:private [final]
EXPRESSION_BODY
GET_VAR 'y: T2 of <uninitialized parent> declared in <root>.Test1.<init>' type=T2 of <uninitialized parent> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-y> visibility:public modality:FINAL <> ($this:<root>.Test1) returnType:T2 of <root>.Test1
@@ -29,7 +29,7 @@ FILE fqName:<root> fileName:/constructor.kt
$this: VALUE_PARAMETER name:<this> type:<root>.Test1
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-y> (): T2 of <root>.Test1 declared in <root>.Test1'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:T2 of <root>.Test1 visibility:public [final]' type=T2 of <root>.Test1 origin=null
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:T2 of <root>.Test1 visibility:private [final]' type=T2 of <root>.Test1 origin=null
receiver: GET_VAR '<this>: <root>.Test1 declared in <root>.Test1.<get-y>' type=<root>.Test1 origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
overridden:
@@ -53,7 +53,7 @@ FILE fqName:<root> fileName:/constructor.kt
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test2 modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:y visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:public [final]
FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]
EXPRESSION_BODY
GET_VAR 'y: kotlin.String declared in <root>.Test2.<init>' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-y> visibility:public modality:FINAL <> ($this:<root>.Test2) returnType:kotlin.String
@@ -61,7 +61,7 @@ FILE fqName:<root> fileName:/constructor.kt
$this: VALUE_PARAMETER name:<this> type:<root>.Test2
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-y> (): kotlin.String declared in <root>.Test2'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:public [final]' type=kotlin.String origin=null
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2.<get-y>' type=<root>.Test2 origin=null
CLASS CLASS name:TestInner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Test2.TestInner
@@ -72,7 +72,7 @@ FILE fqName:<root> fileName:/constructor.kt
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestInner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]'
PROPERTY name:z visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:z type:Z of <root>.Test2.TestInner visibility:public [final]
FIELD PROPERTY_BACKING_FIELD name:z type:Z of <root>.Test2.TestInner visibility:private [final]
EXPRESSION_BODY
GET_VAR 'z: Z of <uninitialized parent> declared in <root>.Test2.TestInner.<init>' type=Z of <uninitialized parent> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-z> visibility:public modality:FINAL <> ($this:<root>.Test2.TestInner) returnType:Z of <root>.Test2.TestInner
@@ -80,7 +80,7 @@ FILE fqName:<root> fileName:/constructor.kt
$this: VALUE_PARAMETER name:<this> type:<root>.Test2.TestInner
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-z> (): Z of <root>.Test2.TestInner declared in <root>.Test2.TestInner'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:Z of <root>.Test2.TestInner visibility:public [final]' type=Z of <root>.Test2.TestInner origin=null
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:Z of <root>.Test2.TestInner visibility:private [final]' type=Z of <root>.Test2.TestInner origin=null
receiver: GET_VAR '<this>: <root>.Test2.TestInner declared in <root>.Test2.TestInner.<get-z>' type=<root>.Test2.TestInner origin=null
CONSTRUCTOR visibility:public <> (z:Z of <uninitialized parent>, i:kotlin.Int) returnType:<root>.Test2.TestInner<Z of <uninitialized parent>>
VALUE_PARAMETER name:z index:0 type:Z of <uninitialized parent>
@@ -126,7 +126,7 @@ FILE fqName:<root> fileName:/constructor.kt
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test3 modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:x visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public [final]
FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]
EXPRESSION_BODY
GET_VAR 'x: kotlin.Int declared in <root>.Test3.<init>' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> ($this:<root>.Test3) returnType:kotlin.Int
@@ -134,10 +134,10 @@ FILE fqName:<root> fileName:/constructor.kt
$this: VALUE_PARAMETER name:<this> type:<root>.Test3
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-x> (): kotlin.Int declared in <root>.Test3'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public [final]' type=kotlin.Int origin=null
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Test3 declared in <root>.Test3.<get-x>' type=<root>.Test3 origin=null
PROPERTY name:y visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:public [final]
FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]
EXPRESSION_BODY
GET_VAR 'y: kotlin.String declared in <root>.Test3.<init>' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-y> visibility:public modality:FINAL <> ($this:<root>.Test3) returnType:kotlin.String
@@ -145,7 +145,7 @@ FILE fqName:<root> fileName:/constructor.kt
$this: VALUE_PARAMETER name:<this> type:<root>.Test3
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-y> (): kotlin.String declared in <root>.Test3'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:public [final]' type=kotlin.String origin=null
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.Test3 declared in <root>.Test3.<get-y>' type=<root>.Test3 origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
overridden:
@@ -169,7 +169,7 @@ FILE fqName:<root> fileName:/constructor.kt
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test4 modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:x visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public [final]
FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]
EXPRESSION_BODY
GET_VAR 'x: kotlin.Int declared in <root>.Test4.<init>' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> ($this:<root>.Test4) returnType:kotlin.Int
@@ -177,7 +177,7 @@ FILE fqName:<root> fileName:/constructor.kt
$this: VALUE_PARAMETER name:<this> type:<root>.Test4
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-x> (): kotlin.Int declared in <root>.Test4'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public [final]' type=kotlin.Int origin=null
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Test4 declared in <root>.Test4.<get-x>' type=<root>.Test4 origin=null
CONSTRUCTOR visibility:public <> (x:kotlin.Int, y:kotlin.Int) returnType:<root>.Test4<T of <uninitialized parent>>
VALUE_PARAMETER name:x index:0 type:kotlin.Int