K2: Fix type-alias expansion during suspend function type serialization

When suspend function type is serialized, there is special logic that
adds Continuation parameter, before doing so, type-aliases has to be
expanded, attributes for resulting type should also derive from
expanded type

KT-53193, KT-54062
This commit is contained in:
Simon Ogorodnik
2022-08-31 15:07:26 +02:00
committed by Space
parent 3f406044a6
commit 8bdb8ba232
10 changed files with 57 additions and 1 deletions
@@ -0,0 +1,9 @@
// NO_CHECK_SOURCE_VS_BINARY
// Type-alias info is lost during serialization in K1
package test
class Context
typealias SuspendWithContext = suspend Context.() -> Unit
fun foo(f: SuspendWithContext) {}
@@ -0,0 +1,8 @@
package test
public fun foo(/*0*/ f: suspend test.Context.() -> kotlin.Unit): kotlin.Unit
public final class Context {
/*primary*/ public constructor Context()
}
public typealias SuspendWithContext = suspend test.Context.() -> kotlin.Unit