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

dalexander

10/14/2016, 5:48 PM
I’m not very familiar with swift, but I believe that is a null guard statement? Kotlin uses flow sensitive typing so just an if statement can serve the same role.
Copy code
val nullable: Foo? = Foo()
if(nullable != null){
  nullable.doSomething() //the compiler knows this is safe
}