Files
kotlin-fork/compiler/testData/ir/loweredIr/interpreter/enumName.kt
T
Ivan Kylchik 0b22cf6cb9 Rewrite ir interpreter's dump tests to box
Box tests will check the correctness of interpreter, meantime
by dumped ir we can understand that expression was folded.
2022-05-18 21:20:01 +03:00

15 lines
423 B
Kotlin
Vendored

enum class EnumClass {
OK, VALUE, anotherValue, WITH_UNDERSCORE
}
const val name1 = EnumClass.OK.name
const val name2 = EnumClass.VALUE.name
const val name3 = EnumClass.anotherValue.name
const val name4 = EnumClass.WITH_UNDERSCORE.name
fun box(): String {
if (name2 != "VALUE") return "Fail 1"
if (name3 != "anotherValue") return "Fail 2"
if (name4 != "WITH_UNDERSCORE") return "Fail 3"
return name1
}