mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-13 00:21:28 +00:00
20 lines
346 B
Kotlin
20 lines
346 B
Kotlin
// FILE: enum.kt
|
|
|
|
package enum
|
|
|
|
enum class HappyEnum {
|
|
CASE1
|
|
CASE2
|
|
}
|
|
|
|
// FILE: user.kt
|
|
|
|
import enum.HappyEnum
|
|
import enum.HappyEnum.*
|
|
|
|
fun f(e: HappyEnum) {
|
|
when (e) {
|
|
CASE1 -> throw UnsupportedOperationException() // unresolved reference
|
|
CASE2 -> throw UnsupportedOperationException() // unresolved references
|
|
}
|
|
} |