971b4e63e7
#KT-59710 Fixed
33 lines
541 B
Kotlin
Vendored
33 lines
541 B
Kotlin
Vendored
// TARGET_BACKEND: JVM_IR
|
|
// NO_CHECK_LAMBDA_INLINING
|
|
// !OPT_IN: kotlin.ExperimentalStdlibApi
|
|
// WITH_STDLIB
|
|
// FILE: test/Z.java
|
|
|
|
package test;
|
|
|
|
public enum Z {
|
|
O, K
|
|
}
|
|
|
|
// FILE: 1.kt
|
|
|
|
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") // TODO: remove once KT-53154 is fixed.
|
|
|
|
package test
|
|
|
|
import kotlin.enums.enumEntries
|
|
|
|
inline fun <reified T : Enum<T>> myEntries(): String {
|
|
val values = enumEntries<T>()
|
|
return values.joinToString("")
|
|
}
|
|
|
|
// FILE: 2.kt
|
|
|
|
import test.*
|
|
|
|
fun box(): String {
|
|
return myEntries<Z>()
|
|
}
|