Skip to content

Commit d5ea1be

Browse files
authored
Merge pull request #11450 from ayushworks/master
Update explicit-nulls.md
2 parents e504518 + ff0b381 commit d5ea1be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/docs/reference/other-new-features/explicit-nulls.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ if s != null then
298298

299299
// s: String|Null
300300

301-
assert(x != null)
301+
assert(s != null)
302302
// s: String
303303
```
304304

@@ -382,7 +382,7 @@ while xs != null do
382382
When dealing with local mutable variables, there are two questions:
383383

384384
1. Whether to track a local mutable variable during flow typing.
385-
We track a local mutable variable iff the variable is not assigned in a closure.
385+
We track a local mutable variable if the variable is not assigned in a closure.
386386
For example, in the following code `x` is assigned to by the closure `y`, so we do not
387387
do flow typing on `x`.
388388

0 commit comments

Comments
 (0)