IR: use map in remapTypeParameters
In LocalDeclarationLowering, the moved local function does not necessarily receive a continuous chunk of type parameters that it captures.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
class Holder<T: Any>(val v: T)
|
||||
|
||||
fun <C: Any> outer(arg: C): C {
|
||||
fun <HC: Holder<C>> inner1(hh: HC): C {
|
||||
fun inner2() = hh.v // two type parameters: C and HC
|
||||
return inner2()
|
||||
}
|
||||
return inner1(Holder(arg))
|
||||
}
|
||||
|
||||
fun box(): String = outer("OK")
|
||||
Reference in New Issue
Block a user