Files
kotlin-fork/compiler/testData/codegen/box/enum/declaringClassOnEnumObject.kt
T
2021-01-28 18:30:48 +01:00

14 lines
285 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// IGNORE_BACKEND_FIR: JVM_IR
package test
enum class KEnum { A }
fun test(e: KEnum): String {
return e.declaringClass.toString()
}
fun box(): String {
val result = test(KEnum.A)
return if (result == "class test.KEnum") "OK" else "fail: $result"
}