Hi, is there any way to convert a nullable KType t...
# reflect
a
Hi, is there any way to convert a nullable KType to its non-null peer? e.g.
Copy code
class Foo(val nonNull: Int, val nullable: Int?)
val nonNull: KType = Foo::nonNull.returnType
val nullable: KType = Foo::nullable.returnType

fun main(args: Array<String>) {
    println("$nonNull $nullable") // <http://kotlin.Int|kotlin.Int> <http://kotlin.Int|kotlin.Int>?
    // Any way to convert nullable KType to it's nonNull peer?
}
At the moment I'm using some hacks via javaType and allowing for primitives. Is there a better way?