You can use Any as well as the specific type. Just add something like:
when (value) {
is String -> foo()
is Number -> bar()
is MyInterface -> next()
}
You can use Any as well as the specific type. Just add something like:
when (value) {
is String -> foo()
is Number -> bar()
is MyInterface -> next()
}