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
@@ -50,12 +50,18 @@ FILE fqName:<root> fileName:/integerCoercionToT.kt
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
TYPEALIAS typealias CInt32Var = CInt32VarX<Int> type=CInt32VarX<kotlin.Int>
PROPERTY name:value type:T_INT visibility:public modality:FINAL flags:var
FUN name:<get-value> visibility:public modality:FINAL <> ($receiver:CInt32VarX<T_INT>) returnType:T_INT flags:
FUN name:<get-value> visibility:public modality:FINAL <T_INT> ($receiver:CInt32VarX<T_INT>) returnType:T_INT flags:
TYPE_PARAMETER name:T_INT index:0 variance: upperBounds:[kotlin.Int]
superClassifiers:
CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Int modality:FINAL visibility:public flags:
$receiver: VALUE_PARAMETER name:<this> type:CInt32VarX<T_INT> flags:
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-value>() on CInt32VarX<T_INT>: T_INT'
CALL 'TODO(): Nothing' type=kotlin.Nothing origin=null
FUN name:<set-value> visibility:public modality:FINAL <> ($receiver:CInt32VarX<T_INT>, value:T_INT) returnType:Unit flags:
FUN name:<set-value> visibility:public modality:FINAL <T_INT> ($receiver:CInt32VarX<T_INT>, value:T_INT) returnType:Unit flags:
TYPE_PARAMETER name:T_INT index:0 variance: upperBounds:[kotlin.Int]
superClassifiers:
CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Int modality:FINAL visibility:public flags:
$receiver: VALUE_PARAMETER name:<this> type:CInt32VarX<T_INT> flags:
VALUE_PARAMETER name:value index:0 type:T_INT flags:
BLOCK_BODY