From a415f4942bc0b47d315b1b321da23febf707b592 Mon Sep 17 00:00:00 2001 From: Neal Gafter Date: Thu, 5 Nov 2015 10:56:48 -0800 Subject: [PATCH] Clarify DA rules for let --- docs/features/patterns.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/features/patterns.md b/docs/features/patterns.md index f2bd0f8b0c3..fdc264f0332 100644 --- a/docs/features/patterns.md +++ b/docs/features/patterns.md @@ -311,7 +311,7 @@ Semantically, it is an error unless precisely one of the following is true If an `else` clause is present, it is an error if the endpoint of its *embedded-statement* is reachable. -Any pattern variables in the *pattern* are in scope throughout the enclosing block and are definitely assigned (only) after the execution of the *let-statement* completes. It is an error to use these variables before their point of definition. +Any pattern variables in the *pattern* are in scope throughout the enclosing block. They are not definitely assigned before the `else` clause, and are definitely assigned after the *let-statement*. It is an error to use these variables before their point of definition. A *let-statement* is a *block-statement* and not an *embedded-statement* because its primary purpose is to introduce names into the enclosing scope. It therefore does not introduce a dangling-else ambiguity. -- GitLab