如何将Class <T> #cast方法从Java转换为Kotlin?

我想从Java转换下面的代码:

Object from = ... Class<T> toClass = ... T result = toClass.cast(from); 

到Kotlin:

 Any? from = ... KClass<T> toClass = ... T result = // toClass.cast(from) - how to convert this line to Kotlin? 

怎么做?

Kotlin language will be the best programming language for Android.