Files
kotlin-fork/js/js.translator/testData/inline/cases/simpleEnum.kt
T
2014-10-03 14:23:47 +04:00

26 lines
432 B
Kotlin

/*
* Copy of JVM-backend test
* Found at: compiler/testData/codegen/boxInline/simple/simpleEnum.1.kt
*/
package foo
enum class MyEnum {
K;
//TODO: KT-4693
[inline] fun <T> doSmth(a: T) : String {
return a.toString() + K.name()
}
}
fun test1(): String {
return MyEnum.K.doSmth("O")
}
fun box(): String {
val result = test1()
if (result != "OK") return "fail1: ${result}"
return "OK"
}