mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
20 lines
328 B
Kotlin
Vendored
20 lines
328 B
Kotlin
Vendored
object Constants {
|
|
const val A = 30
|
|
const val B = 40
|
|
}
|
|
|
|
class ClassConstants {
|
|
companion object {
|
|
const val C = 50
|
|
}
|
|
}
|
|
fun foo(state: Int) {
|
|
when (state) {
|
|
Constants.A -> return
|
|
Constants.B -> return
|
|
ClassConstants.C -> return
|
|
else -> return
|
|
}
|
|
}
|
|
|
|
// 1 LOOKUPSWITCH |