mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
26 lines
358 B
Kotlin
Vendored
26 lines
358 B
Kotlin
Vendored
// FILE: 1.kt
|
|
// WITH_RUNTIME
|
|
package test
|
|
|
|
inline fun <reified Y : Enum<Y>> myValues2(): String {
|
|
val values = enumValues<Y>()
|
|
return values.joinToString("")
|
|
}
|
|
|
|
inline fun <reified T : Enum<T>> myValues(): String {
|
|
return myValues2<T>()
|
|
}
|
|
|
|
enum class Z {
|
|
O, K
|
|
}
|
|
|
|
|
|
// FILE: 2.kt
|
|
|
|
import test.*
|
|
|
|
fun box(): String {
|
|
return myValues<Z>()
|
|
}
|