```fun Any.castTo(cast: Something) = this as cast`...
# announcements
t
Copy code
fun Any.castTo(cast: Something) = this as cast
What should be in place of Something for this function to work?
b
You're going to want to do a reified function instead
Copy code
inline fun <reified T> Any.castTo() = this as T
then consume it
Copy code
Bar().castTo<Foo>()