0b22cf6cb9
Box tests will check the correctness of interpreter, meantime by dumped ir we can understand that expression was folded.
15 lines
423 B
Kotlin
Vendored
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
|
|
} |