Skip to content

Commit f3a8c15

Browse files
committed
tmp(docs); for fix test
1 parent 3194093 commit f3a8c15

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/topics/null-safety.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,9 @@ You can also place a safe call on the left side of an assignment:
215215
person?.department?.head = managersPool.getManager()
216216
```
217217

218-
In the example above, if one of the receivers in the safe call chain is `null`, the assignment is skipped, and the expression on the right is not evaluated at all. For example, if either
219-
`person` or `person.department` is `null`, the function is not called. Here's the equivalent of the same safe call but with the `if` conditional:
218+
In the example above, if one of the receivers in the safe call chain is `null`, the assignment is skipped, and the
219+
expression on the right is not evaluated at all. For example, if either `person` or `person.department` is `null`, the
220+
function is not called. Here's the equivalent of the same safe call but with the `if` conditional:
220221

221222
```kotlin
222223
if (person != null && person.department != null) {
@@ -247,6 +248,7 @@ Instead of writing the complete `if` expression, you can handle this in a more c
247248

248249
```kotlin
249250
fun main() {
251+
250252
//sampleStart
251253
// Assigns null to a nullable variable
252254
val b: String? = null

0 commit comments

Comments
 (0)