https://kotlinlang.org logo
#getting-started
Title
# getting-started
a

appasni

03/17/2017, 6:12 PM
The following however fails
val email: String = "".takeIf { it.contains("@") }
with
Type inference failed. Expected type mismatch: inferred type is String? but String was expected