Skip to content

Commit

Permalink
Update example to ensure it's highlighted correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
yole committed May 12, 2017
1 parent 6062213 commit 3cec0fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kotlin-features/safe.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ output = null // Compilation error
Kotlin protects you from mistakenly operating on nullable types

``` kotlin
val data: String? = null // Nullable type
println(data.length()) // Compilation error
val name: String? = null // Nullable type
println(name.length()) // Compilation error
```

And if you check a type is right, the compiler will auto-cast it for you
Expand Down

0 comments on commit 3cec0fc

Please sign in to comment.