Huh, so I have to use hack: ``` inline fun <rei...
# announcements
i
Huh, so I have to use hack:
Copy code
inline fun <reified T : Any?> sample() {
    println("Is nullable: ${isNullable<T>()}")
}

inline fun <reified T : Any?> isNullable(): Boolean {
    return try {
        null as T
        true
    } catch (e: Exception) {
        false
    }
}

fun main(args: Array<String>) {
    sample<String?>()
    sample<String>()
}
s
null is T
not working here?
i
Yes, working. That was second idea.