mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
35 lines
401 B
Kotlin
Vendored
35 lines
401 B
Kotlin
Vendored
// 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)
|
|
}
|