mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
18 lines
291 B
Kotlin
Vendored
18 lines
291 B
Kotlin
Vendored
fun testInt(i: Int?) =
|
|
when (i) {
|
|
0 -> "zero"
|
|
42 -> "magic"
|
|
else -> "other"
|
|
}
|
|
|
|
fun testLong(i: Long?) =
|
|
when (i) {
|
|
0L -> "zero"
|
|
42L -> "magic"
|
|
else -> "other"
|
|
}
|
|
|
|
// 0 valueOf
|
|
// 0 Integer.valueOf
|
|
// 0 Long.valueOf
|
|
// 0 areEqual |