[FIR2IR] Correctly map arguments of type alias constructor call

Previously, we applied type arguments as is when converting type alias
constructor calls to IR.
Now, we map them using the expansion of the type alias.

#KT-59743 Fixed
This commit is contained in:
Kirill Rakhman
2023-07-19 10:48:13 +02:00
committed by Space Team
parent b4335c86c8
commit e35a28d36d
16 changed files with 653 additions and 11 deletions
@@ -43,5 +43,5 @@ FILE fqName:<root> fileName:/typeAliasCtorForGenericClass.kt
q: CONST Int type=kotlin.Int value=2
VAR name:b2 type:<root>.A<<root>.A<kotlin.Int>> [val]
CONSTRUCTOR_CALL 'public constructor <init> (q: Q of <root>.A) declared in <root>.A' type=<root>.A<<root>.A<kotlin.Int>> origin=null
<class: Q>: kotlin.Int
<class: Q>: <root>.A<kotlin.Int>
q: GET_VAR 'val b: <root>.A<kotlin.Int> declared in <root>.bar' type=<root>.A<kotlin.Int> origin=null
@@ -15,5 +15,5 @@ class A<Q : Any?> {
fun bar() {
val b: A<Int> = A<Int>(q = 2)
val b2: A<A<Int>> = A<Int>(q = b)
val b2: A<A<Int>> = A<A<Int>>(q = b)
}