// TARGET_BACKEND: JVM // WITH_RUNTIME // WITH_STDLIB // FILE: 1.kt package test abstract class TypeToken // Although V is not reified, if the object happens to be regenerated, V will be replaced with its value in signatures inline fun typeTokenOf(crossinline forceRegeneration: () -> Unit = {}) = object : TypeToken() { fun unused() = forceRegeneration() } // FILE: 2.kt import test.* fun interface I { fun foo(): String } fun foo() = I { typeTokenOf()::class.java.genericSuperclass.toString() }.foo() fun box(): String = foo().let { if (it == "test.TypeToken") "OK" else it }