JVM: do not reify methods of objects in lambdas

All type parameters used in them are not from the inline function
anyway.
This commit is contained in:
pyos
2021-07-07 17:58:17 +02:00
committed by max-kammerer
parent 717cf2066a
commit 07cb3a5ff8
14 changed files with 92 additions and 16 deletions
@@ -0,0 +1,16 @@
// FILE: 1.kt
package test
inline fun <reified T> f(x: () -> String) = x()
inline fun <reified T> g() = f<Unit> {
val x = { T::class.simpleName }
x()!!
}
// FILE: 2.kt
import test.*
class OK
fun box() = g<OK>()