svd
fun test(key: Any) { if(key is Foo) { val foo = key as Foo val any = when (foo) { is Foo.Bar -> foo.smth } } }