Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Check if kotlin generic is nullable type
inline fun <reified T> isNullable(): Boolean = null is T
@tieskedh
Copy link

tieskedh commented Feb 19, 2018

haha, i was searching for a very complex function with reflection and stumbled upon this method.
It makes me feel dumb...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment