IR: IrSimpleFunction.correspondingProperty: IrProperty?

Non-null for a property accessor, points to a corresponding property.
This commit is contained in:
Dmitry Petrov
2018-05-24 16:47:25 +03:00
parent 216dbf9637
commit ab455d6572
146 changed files with 604 additions and 20 deletions
@@ -8,6 +8,7 @@ FILE fqName:<root> fileName:/anonymousFunction.kt
CALL 'println(): Unit' type=kotlin.Unit origin=null
FUNCTION_REFERENCE '<no name provided>(): Unit' type=() -> kotlin.Unit origin=ANONYMOUS_FUNCTION
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-anonymous> visibility:public modality:FINAL <> () returnType:Function0<Unit> flags:
correspondingProperty: PROPERTY name:anonymous type:() -> kotlin.Unit visibility:public modality:FINAL flags:val
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-anonymous>(): () -> Unit'
GET_FIELD 'anonymous: () -> Unit' type=() -> kotlin.Unit origin=null
@@ -14,6 +14,7 @@ FILE fqName:<root> fileName:/destructuringInLambda.kt
EXPRESSION_BODY
GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> ($this:A) returnType:Int flags:
correspondingProperty: PROPERTY name:x type:kotlin.Int visibility:public modality:FINAL flags:val
$this: VALUE_PARAMETER name:<this> type:A flags:
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
@@ -24,6 +25,7 @@ FILE fqName:<root> fileName:/destructuringInLambda.kt
EXPRESSION_BODY
GET_VAR 'value-parameter y: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-y> visibility:public modality:FINAL <> ($this:A) returnType:Int flags:
correspondingProperty: PROPERTY name:y type:kotlin.Int visibility:public modality:FINAL flags:val
$this: VALUE_PARAMETER name:<this> type:A flags:
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): Int'
@@ -155,10 +157,12 @@ FILE fqName:<root> fileName:/destructuringInLambda.kt
other: GET_VAR 'y: Int' type=kotlin.Int origin=null
FUNCTION_REFERENCE '<anonymous>(A): Int' type=(A) -> kotlin.Int origin=LAMBDA
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-fn> visibility:public modality:FINAL <> () returnType:Function1<A, Int> flags:
correspondingProperty: PROPERTY name:fn type:(A) -> kotlin.Int visibility:public modality:FINAL flags:var
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-fn>(): (A) -> Int'
GET_FIELD 'fn: (A) -> Int' type=(A) -> kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-fn> visibility:public modality:FINAL <> (<set-?>:(A) -> kotlin.Int) returnType:Unit flags:
correspondingProperty: PROPERTY name:fn type:(A) -> kotlin.Int visibility:public modality:FINAL flags:var
VALUE_PARAMETER name:<set-?> index:0 type:(A) -> kotlin.Int flags:
BLOCK_BODY
SET_FIELD 'fn: (A) -> Int' type=kotlin.Unit origin=null
+2
View File
@@ -9,6 +9,7 @@ FILE fqName:<root> fileName:/justLambda.kt
CONST Int type=kotlin.Int value=42
FUNCTION_REFERENCE '<anonymous>(): Int' type=() -> kotlin.Int origin=LAMBDA
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:Function0<Int> flags:
correspondingProperty: PROPERTY name:test1 type:() -> kotlin.Int visibility:public modality:FINAL flags:val
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test1>(): () -> Int'
GET_FIELD 'test1: () -> Int' type=() -> kotlin.Int origin=null
@@ -22,6 +23,7 @@ FILE fqName:<root> fileName:/justLambda.kt
GET_OBJECT 'Unit' type=kotlin.Unit
FUNCTION_REFERENCE '<anonymous>(): Unit' type=() -> kotlin.Unit origin=LAMBDA
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:Function0<Unit> flags:
correspondingProperty: PROPERTY name:test2 type:() -> kotlin.Unit visibility:public modality:FINAL flags:val
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test2>(): () -> Unit'
GET_FIELD 'test2: () -> Unit' type=() -> kotlin.Unit origin=null
@@ -47,6 +47,7 @@ FILE fqName:<root> fileName:/multipleImplicitReceivers.kt
CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags:
PROPERTY name:foo type:B visibility:public modality:OPEN flags:val
FUN name:<get-foo> visibility:public modality:OPEN <> ($this:IFoo, $receiver:A) returnType:B flags:
correspondingProperty: PROPERTY name:foo type:B visibility:public modality:OPEN flags:val
$this: VALUE_PARAMETER name:<this> type:IFoo flags:
$receiver: VALUE_PARAMETER name:<this> type:A flags:
BLOCK_BODY