[K/Wasm] Rework Wasm enumEntriesIntrinsic declaration to fix stdlib compilation

This commit is contained in:
Artem Kobzar
2023-08-01 11:53:14 +00:00
committed by Space Team
parent 12715c062d
commit cd840997b1
5 changed files with 36 additions and 10 deletions
@@ -8,6 +8,10 @@ package kotlin.enums
@SinceKotlin("1.9")
@ExperimentalStdlibApi
@PublishedApi
// TODO: After the expect fun enumEntriesIntrinsic become non-inline function, the suppress and external keyword should be removed
@Suppress("INLINE_EXTERNAL_DECLARATION", "WRONG_JS_INTEROP_TYPE")
internal actual external inline fun <reified T : Enum<T>> enumEntriesIntrinsic(): EnumEntries<T>
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>())
}