Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
when with check type
var sum = 234
when (sum) {
is Int -> println("The sum is $sum")
else -> println("It is not an Int")
}// => The sum is 234
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment