Files
kotlin-fork/backend.native/tests/external/codegen/boxInline/anonymousObject/enumWhen/declSite.kt
T
2017-03-13 15:31:46 +03:00

23 lines
242 B
Kotlin

// FILE: 1.kt
package test
enum class X {
A,
B
}
inline fun test(e: X): String {
return when(e) {
X.A-> "O"
X.B-> "K"
}
}
// FILE: 2.kt
import test.*
fun box(): String {
return test(X.A) + test(X.B)
}