Fix psi2ir when type parameter bound goes after the type parameter

This commit is contained in:
Svyatoslav Scherbina
2018-03-16 12:22:56 +03:00
parent c0b0f6d1ca
commit aac940415f
4 changed files with 77 additions and 4 deletions
@@ -0,0 +1,7 @@
class Test1<T : U, U>
fun <T : U, U> test2() {}
var <T : U, U> Test1<T, U>.test3: Unit
get() {}
set(value) {}
@@ -0,0 +1,56 @@
FILE fqName:<root> fileName:/typeParameterBeforeBound.kt
CLASS CLASS name:Test1 modality:FINAL visibility:public flags:
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:Test1<T, U> flags:
superClasses:
CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags:
TYPE_PARAMETER name:T index:0 variance: upperBounds:[U]
superClassifiers:
TYPE_PARAMETER name:U index:1 variance: upperBounds:[kotlin.Any?]
TYPE_PARAMETER name:U index:1 variance: upperBounds:[kotlin.Any?]
superClassifiers:
CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags:
CONSTRUCTOR visibility:public <> () returnType:Test1<T, U> flags:
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='Test1'
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:Boolean flags:
overridden:
FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:Boolean flags:
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
VALUE_PARAMETER name:other index:0 type:kotlin.Any? flags:
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:Int flags:
overridden:
FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:Int flags:
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:String flags:
overridden:
FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:String flags:
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
FUN name:test2 visibility:public modality:FINAL <T, U> () returnType:Unit flags:
TYPE_PARAMETER name:T index:0 variance: upperBounds:[U]
superClassifiers:
TYPE_PARAMETER name:U index:1 variance: upperBounds:[kotlin.Any?]
TYPE_PARAMETER name:U index:1 variance: upperBounds:[kotlin.Any?]
superClassifiers:
CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags:
BLOCK_BODY
PROPERTY name:test3 type:kotlin.Unit visibility:public modality:FINAL flags:var
FUN name:<get-test3> visibility:public modality:FINAL <T, U> ($receiver:Test1<T, U>) returnType:Unit flags:
TYPE_PARAMETER name:T index:0 variance: upperBounds:[U]
superClassifiers:
TYPE_PARAMETER name:U index:1 variance: upperBounds:[kotlin.Any?]
TYPE_PARAMETER name:U index:1 variance: upperBounds:[kotlin.Any?]
superClassifiers:
CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags:
$receiver: VALUE_PARAMETER name:<this> type:Test1<T, U> flags:
BLOCK_BODY
FUN name:<set-test3> visibility:public modality:FINAL <T, U> ($receiver:Test1<T, U>, value:kotlin.Unit) returnType:Unit flags:
TYPE_PARAMETER name:T index:0 variance: upperBounds:[U]
superClassifiers:
TYPE_PARAMETER name:U index:1 variance: upperBounds:[kotlin.Any?]
TYPE_PARAMETER name:U index:1 variance: upperBounds:[kotlin.Any?]
superClassifiers:
CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags:
$receiver: VALUE_PARAMETER name:<this> type:Test1<T, U> flags:
VALUE_PARAMETER name:value index:0 type:kotlin.Unit flags:
BLOCK_BODY