KType of typealias


I have the following scenario:

class Test<T>(val thing: T)
typealias StringTest = Test<String>

fun main(args: Array<String>) {
  val stringTest = StringTest("Hello")

This outputs Test<*>. Is there a way I can instead get a KType for StringTest?


Type aliases exist only at compilation time; the use of type aliases does not affect the generated bytecode in any way.


Ah ok that makes sense. I’ll have to extend instead. Thanks