Created
August 4, 2017 12:38
-
-
Save dant3/1c5f8ba8555cadb0c418523de7857e50 to your computer and use it in GitHub Desktop.
Check if kotlin generic is nullable type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inline fun <reified T> isNullable(): Boolean = null is T |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
haha, i was searching for a very complex function with reflection and stumbled upon this method.
It makes me feel dumb...