[K/N] Basic support of Enum.entries for Native
No forward compatibility yet, with old klib IR linker will fail. ^KT-53324
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
// !LANGUAGE: +EnumEntries
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// TARGET_BACKEND: NATIVE
|
||||
// WITH_STDLIB
|
||||
|
||||
enum class EnumWithClash {
|
||||
values,
|
||||
entries,
|
||||
valueOf;
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
fun box(): String {
|
||||
val ref = EnumWithClash::entries
|
||||
if (ref().toString() != "[values, entries, valueOf]") return "FAIL 1"
|
||||
if (EnumWithClash.entries.toString() != "entries") return "FAIL 2"
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user