03fdba5aa7
The `enumEntries` intrinsic has been made public in 64c8ce18a0.
20 lines
407 B
Kotlin
Vendored
20 lines
407 B
Kotlin
Vendored
// TARGET_BACKEND: JVM_IR
|
|
// WITH_STDLIB
|
|
// !OPT_IN: kotlin.ExperimentalStdlibApi
|
|
|
|
import kotlin.enums.*
|
|
|
|
enum class MyEnum {
|
|
E
|
|
}
|
|
|
|
inline fun <reified T : Enum<T>> enumEntries2(): EnumEntries<T> = enumEntries<T>()
|
|
|
|
fun foo() {
|
|
enumEntries<MyEnum>()
|
|
enumEntries2<MyEnum>()
|
|
}
|
|
|
|
// There should be one call to enumEntries in MyEnum.<clinit>.
|
|
// 1 INVOKESTATIC kotlin/enums/EnumEntriesKt.enumEntries
|