class A fun Any.test(): () -> Int = when { this is A -> fun() = e else -> { { 0 } } }