FIR2IR: pre-cache type parameters before function creation
Type parameters can be referred from e.g. function return type, so we should determine them earlier to be able to set their indexes
This commit is contained in:
Vendored
+1
-1
@@ -65,7 +65,7 @@ FILE fqName:test fileName:/boundInnerGenericConstructor.kt
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN name:foo visibility:public modality:FINAL <A, B> (a:A of test.foo, b:B of test.foo, x:kotlin.Function2<A of test.foo, B of test.foo, test.Foo.Inner<A of test.foo, B of test.foo>>) returnType:test.Foo.Inner<A of test.foo, B of test.foo> [inline]
|
||||
TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?]
|
||||
TYPE_PARAMETER name:B index:0 variance: superTypes:[kotlin.Any?]
|
||||
TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?]
|
||||
VALUE_PARAMETER name:a index:0 type:A of test.foo
|
||||
VALUE_PARAMETER name:b index:1 type:B of test.foo
|
||||
VALUE_PARAMETER name:x index:2 type:kotlin.Function2<A of test.foo, B of test.foo, test.Foo.Inner<A of test.foo, B of test.foo>>
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
FILE fqName:<root> fileName:/fixationOrder1.kt
|
||||
FUN name:foo visibility:public modality:FINAL <X, Y> () returnType:kotlin.Function1<X of <root>.foo, Y of <root>.foo>
|
||||
TYPE_PARAMETER name:X index:0 variance: superTypes:[kotlin.Any?]
|
||||
TYPE_PARAMETER name:Y index:0 variance: superTypes:[kotlin.Any?]
|
||||
TYPE_PARAMETER name:Y index:1 variance: superTypes:[kotlin.Any?]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun foo <X, Y> (): kotlin.Function1<X of <root>.foo, Y of <root>.foo> declared in <root>'
|
||||
CALL 'public final fun TODO (): kotlin.Nothing [inline] declared in kotlin' type=kotlin.Nothing origin=null
|
||||
@@ -24,7 +24,7 @@ FILE fqName:<root> fileName:/fixationOrder1.kt
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN name:check visibility:public modality:FINAL <T, R> (x:T of <root>.check, y:R of <root>.check, f:kotlin.Function1<T of <root>.check, R of <root>.check>) returnType:<root>.Inv2<T of <root>.check, R of <root>.check>
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
TYPE_PARAMETER name:R index:0 variance: superTypes:[kotlin.Any?]
|
||||
TYPE_PARAMETER name:R index:1 variance: superTypes:[kotlin.Any?]
|
||||
VALUE_PARAMETER name:x index:0 type:T of <root>.check
|
||||
VALUE_PARAMETER name:y index:1 type:R of <root>.check
|
||||
VALUE_PARAMETER name:f index:2 type:kotlin.Function1<T of <root>.check, R of <root>.check>
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
FILE fqName:<root> fileName:/builtinMap.kt
|
||||
FUN name:plus visibility:public modality:FINAL <K1, V1> ($receiver:kotlin.collections.Map<out K1 of <root>.plus, V1 of <root>.plus>, pair:kotlin.Pair<K1 of <root>.plus, V1 of <root>.plus>) returnType:kotlin.collections.Map<K1 of <root>.plus, V1 of <root>.plus>
|
||||
TYPE_PARAMETER name:K1 index:0 variance: superTypes:[kotlin.Any?]
|
||||
TYPE_PARAMETER name:V1 index:0 variance: superTypes:[kotlin.Any?]
|
||||
TYPE_PARAMETER name:V1 index:1 variance: superTypes:[kotlin.Any?]
|
||||
$receiver: VALUE_PARAMETER name:<this> type:kotlin.collections.Map<out K1 of <root>.plus, V1 of <root>.plus>
|
||||
VALUE_PARAMETER name:pair index:0 type:kotlin.Pair<K1 of <root>.plus, V1 of <root>.plus>
|
||||
BLOCK_BODY
|
||||
|
||||
Reference in New Issue
Block a user