Files
kotlin/compiler/testData/codegen/box/reflection/mapping/inlineReifiedFun.kt
Ilya Matveev a5e4e0284e Mute some box tests for native backend
This patch mutes the following test categories:
   * Tests with java dependencies (System class,
     java stdlib, jvm-oriented annotations etc).
   * Coroutines tests.
   * Reflection tests.
   * Tests with an inheritance from the standard
     collections.
2017-03-10 19:59:37 +03:00

24 lines
449 B
Kotlin
Vendored

// IGNORE_BACKEND: JS, NATIVE
// WITH_REFLECT
import kotlin.reflect.*
import kotlin.reflect.jvm.*
import kotlin.test.assertEquals
inline fun <reified T> f() = 1
fun g() {}
class Foo {
inline fun <reified T> h(t: T) = 1
}
fun box(): String {
assertEquals(::g, ::g.javaMethod!!.kotlinFunction)
val h = Foo::class.members.single { it.name == "h" } as KFunction<*>
assertEquals(h, h.javaMethod!!.kotlinFunction)
return "OK"
}