Files
kotlin/compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSite.kt
2018-06-28 12:26:41 +02:00

24 lines
268 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// 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)
}