Generate type parameter declarations for property accessors

This requires "scoped" type parameter symbols, because in the ugly world
of descriptors property accessors have no type parameters of their own.
This commit is contained in:
Dmitry Petrov
2018-03-02 13:12:01 +03:00
parent 31996f1139
commit 13a7270129
16 changed files with 473 additions and 44 deletions
@@ -29,18 +29,27 @@ FILE fqName:<root> fileName:/propertyAccessors.kt
VALUE_PARAMETER name:value index:0 type:kotlin.Int flags:
BLOCK_BODY
PROPERTY name:testExt3 type:kotlin.Int visibility:public modality:FINAL flags:val
FUN name:<get-testExt3> visibility:public modality:FINAL <> ($receiver:T) returnType:Int flags:
FUN name:<get-testExt3> visibility:public modality:FINAL <T> ($receiver:T) returnType:Int flags:
TYPE_PARAMETER name:T index:0 variance: upperBounds:[kotlin.Any?]
superClassifiers:
CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags:
$receiver: VALUE_PARAMETER name:<this> type:T flags:
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-testExt3>() on T: Int'
CONST Int type=kotlin.Int value=42
PROPERTY name:testExt4 type:kotlin.Int visibility:public modality:FINAL flags:var
FUN name:<get-testExt4> visibility:public modality:FINAL <> ($receiver:T) returnType:Int flags:
FUN name:<get-testExt4> visibility:public modality:FINAL <T> ($receiver:T) returnType:Int flags:
TYPE_PARAMETER name:T index:0 variance: upperBounds:[kotlin.Any?]
superClassifiers:
CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags:
$receiver: VALUE_PARAMETER name:<this> type:T flags:
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-testExt4>() on T: Int'
CONST Int type=kotlin.Int value=42
FUN name:<set-testExt4> visibility:public modality:FINAL <> ($receiver:T, value:kotlin.Int) returnType:Unit flags:
FUN name:<set-testExt4> visibility:public modality:FINAL <T> ($receiver:T, value:kotlin.Int) returnType:Unit flags:
TYPE_PARAMETER name:T index:0 variance: upperBounds:[kotlin.Any?]
superClassifiers:
CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags:
$receiver: VALUE_PARAMETER name:<this> type:T flags:
VALUE_PARAMETER name:value index:0 type:kotlin.Int flags:
BLOCK_BODY
@@ -91,20 +100,29 @@ FILE fqName:<root> fileName:/propertyAccessors.kt
VALUE_PARAMETER name:value index:0 type:kotlin.Int flags:
BLOCK_BODY
PROPERTY name:testMemExt3 type:kotlin.Int visibility:public modality:FINAL flags:val
FUN name:<get-testMemExt3> visibility:public modality:FINAL <> ($this:Host<T>, $receiver:TT) returnType:Int flags:
FUN name:<get-testMemExt3> visibility:public modality:FINAL <TT> ($this:Host<T>, $receiver:TT) returnType:Int flags:
TYPE_PARAMETER name:TT index:0 variance: upperBounds:[kotlin.Any?]
superClassifiers:
CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags:
$this: VALUE_PARAMETER name:<this> type:Host<T> flags:
$receiver: VALUE_PARAMETER name:<this> type:TT flags:
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-testMemExt3>() on TT: Int'
CONST Int type=kotlin.Int value=42
PROPERTY name:testMemExt4 type:kotlin.Int visibility:public modality:FINAL flags:var
FUN name:<get-testMemExt4> visibility:public modality:FINAL <> ($this:Host<T>, $receiver:TT) returnType:Int flags:
FUN name:<get-testMemExt4> visibility:public modality:FINAL <TT> ($this:Host<T>, $receiver:TT) returnType:Int flags:
TYPE_PARAMETER name:TT index:0 variance: upperBounds:[kotlin.Any?]
superClassifiers:
CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags:
$this: VALUE_PARAMETER name:<this> type:Host<T> flags:
$receiver: VALUE_PARAMETER name:<this> type:TT flags:
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-testMemExt4>() on TT: Int'
CONST Int type=kotlin.Int value=42
FUN name:<set-testMemExt4> visibility:public modality:FINAL <> ($this:Host<T>, $receiver:TT, value:kotlin.Int) returnType:Unit flags:
FUN name:<set-testMemExt4> visibility:public modality:FINAL <TT> ($this:Host<T>, $receiver:TT, value:kotlin.Int) returnType:Unit flags:
TYPE_PARAMETER name:TT index:0 variance: upperBounds:[kotlin.Any?]
superClassifiers:
CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags:
$this: VALUE_PARAMETER name:<this> type:Host<T> flags:
$receiver: VALUE_PARAMETER name:<this> type:TT flags:
VALUE_PARAMETER name:value index:0 type:kotlin.Int flags: