Files
kotlin/compiler/testData/codegen/box/callableReference/function/genericCallableReferencesWithOverload.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
465 B
Kotlin
Vendored

// IGNORE_BACKEND: JS, NATIVE
// WITH_RUNTIME
// WITH_REFLECT
import kotlin.test.assertEquals
fun foo(x: Int?) {}
fun foo(y: String?) {}
fun foo(z: Boolean) {}
inline fun <reified T> bar(f: (T) -> Unit, tType: String): T? {
assertEquals(tType, T::class.simpleName)
return null
}
fun box(): String {
val a1: Int? = bar(::foo, "Int")
val a2: String? = bar(::foo, "String")
val a3: Boolean? = bar<Boolean>(::foo, "Boolean")
return "OK"
}