mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
22 lines
572 B
Kotlin
Vendored
22 lines
572 B
Kotlin
Vendored
// !LANGUAGE: +InlineClasses
|
|
// IGNORE_BACKEND_FIR: JVM_IR
|
|
// TARGET_BACKEND: JVM
|
|
// WITH_REFLECT
|
|
|
|
import kotlin.reflect.KFunction
|
|
import kotlin.reflect.jvm.javaMethod
|
|
import kotlin.test.*
|
|
|
|
inline class InlineClass1(val s: String)
|
|
inline class InlineClass2(val n: Number)
|
|
|
|
fun <T : InlineClass1, U : InlineClass2> foo(t: T, u: U) {}
|
|
|
|
fun box(): String {
|
|
val fooRef: (InlineClass1, InlineClass2) -> Unit = ::foo
|
|
val fooMethod = (fooRef as KFunction<*>).javaMethod!!
|
|
|
|
assertEquals("[T, U]", fooMethod.genericParameterTypes.asList().toString())
|
|
|
|
return "OK"
|
|
} |