[K/N] Intrinsify enumEntries<T>
^KT-59711
This commit is contained in:
committed by
Space Team
parent
26b0b02553
commit
9cbd55aa72
@@ -5,13 +5,10 @@
|
||||
|
||||
package kotlin.enums
|
||||
|
||||
import kotlin.native.internal.*
|
||||
|
||||
@SinceKotlin("1.9")
|
||||
@ExperimentalStdlibApi
|
||||
@PublishedApi
|
||||
internal actual inline fun <reified T : Enum<T>> enumEntriesIntrinsic(): EnumEntries<T> {
|
||||
/*
|
||||
* Implementation note: this body will be replaced with `throw NotImplementedException()` the moment
|
||||
* all backends starts intrinsifying this call.
|
||||
*/
|
||||
return enumEntries(enumValues<T>())
|
||||
}
|
||||
@TypedIntrinsic(IntrinsicType.ENUM_ENTRIES)
|
||||
internal actual external inline fun <reified T : Enum<T>> enumEntriesIntrinsic(): EnumEntries<T>
|
||||
@@ -59,6 +59,7 @@ internal class IntrinsicType {
|
||||
// Enums
|
||||
const val ENUM_VALUES = "ENUM_VALUES"
|
||||
const val ENUM_VALUE_OF = "ENUM_VALUE_OF"
|
||||
const val ENUM_ENTRIES = "ENUM_ENTRIES"
|
||||
|
||||
// Coroutines
|
||||
const val GET_CONTINUATION = "GET_CONTINUATION"
|
||||
|
||||
Reference in New Issue
Block a user