KType Ref
Wraps a KType instance with a generic type parameter, to ensure type-safe usages.
Using KType directly, we can't guarantee that the method type parameter matches the instance of KType that we get:
fun <T> doSomething(returnType: KType): T {
// ...
}
// could be misused like this
doSomething<String>(typeOf<Int>()) // mismatch String vs IntContent copied to clipboard