andrewoma
09/29/2015, 8:36 PMclass 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?