13 lines
170 B
Kotlin
Vendored
13 lines
170 B
Kotlin
Vendored
class A
|
|
|
|
fun test(a: Any): String {
|
|
var q: String?
|
|
|
|
when (a) {
|
|
is A -> q = "1"
|
|
else -> q = "2"
|
|
}
|
|
// When is not exhaustive
|
|
return q
|
|
}
|