mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
23 lines
242 B
Kotlin
Vendored
23 lines
242 B
Kotlin
Vendored
// 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)
|
|
}
|