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:
@@ -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>()
|
||||
Reference in New Issue
Block a user