From 6dcef127cdf54a9a85cacc8a9d24f1c5b82d3c38 Mon Sep 17 00:00:00 2001 From: Ayush Date: Wed, 17 Feb 2021 22:11:26 +0100 Subject: [PATCH 1/2] Update explicit-nulls.md fix wrong variable name --- docs/docs/reference/other-new-features/explicit-nulls.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/reference/other-new-features/explicit-nulls.md b/docs/docs/reference/other-new-features/explicit-nulls.md index b531774ac1d5..29a4fdd88b92 100644 --- a/docs/docs/reference/other-new-features/explicit-nulls.md +++ b/docs/docs/reference/other-new-features/explicit-nulls.md @@ -298,7 +298,7 @@ if s != null then // s: String|Null -assert(x != null) +assert(s != null) // s: String ``` From ff0b381d2a7cf04e37e54b5c372ad3b281b00807 Mon Sep 17 00:00:00 2001 From: Ayush Date: Wed, 17 Feb 2021 22:23:42 +0100 Subject: [PATCH 2/2] Update explicit-nulls.md --- docs/docs/reference/other-new-features/explicit-nulls.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/reference/other-new-features/explicit-nulls.md b/docs/docs/reference/other-new-features/explicit-nulls.md index 29a4fdd88b92..3afda5002829 100644 --- a/docs/docs/reference/other-new-features/explicit-nulls.md +++ b/docs/docs/reference/other-new-features/explicit-nulls.md @@ -382,7 +382,7 @@ while xs != null do When dealing with local mutable variables, there are two questions: 1. Whether to track a local mutable variable during flow typing. - We track a local mutable variable iff the variable is not assigned in a closure. + We track a local mutable variable if the variable is not assigned in a closure. For example, in the following code `x` is assigned to by the closure `y`, so we do not do flow typing on `x`.