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

35 lines
401 B
Kotlin

// FILE: 1.kt
package test
enum class X {
A,
B
}
enum class Y {
A,
B
}
fun funForAdditionalMappingArrayInMappingFile(e: Y): String {
return when(e) {
Y.A-> "O"
Y.B-> "K"
}
}
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)
}