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:
Georgy Bronnikov
2020-01-10 20:49:23 +03:00
parent 0abdd0cb7b
commit 049bb54ea6
9 changed files with 71 additions and 13 deletions
@@ -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")