robstoll
11/17/2020, 8:07 PMfun <reified T>
is a nullable type? I am asking in the context of https://youtrack.jetbrains.com/issue/KT-8947
I would like to be able to do something like:
fun <reified T> foo() = if(T::isNullable) "y" else "n"
foo<Int?>() // returns y
foo<Int>() // return n
Arkadii Ivanov
11/17/2020, 8:51 PMArkadii Ivanov
11/17/2020, 8:51 PMrobstoll
11/17/2020, 8:53 PMilya.gorbunov
11/18/2020, 8:39 AMif (null is T)
Checks whether null belongs to T
type that can be only if T
is nullable.robstoll
11/19/2020, 6:41 AMilya.gorbunov
11/19/2020, 10:00 AM