Skip to content

Commit 004c458

Browse files
Nigel-Ecmajskeet
authored andcommitted
Update declaration-scope defn
Addresses #910
1 parent b12a529 commit 004c458

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

standard/variables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ For any variable, the ***ref-safe-context*** of that variable is the context whe
10601060
10611061
There are three ref-safe-contexts:
10621062
1063-
- ***declaration-block***: The ref-safe-context of a *variable_reference* to a local variable ([§9.2.9](variables.md#929-local-variables)) extends from its declaration to the end of the scope in which it is declared, including into any nested *embedded-statement*s in this range.
1063+
- ***declaration-block***: The ref-safe-context of a *variable_reference* to a local variable ([§9.2.9](variables.md#929-local-variables)) is that local variables scope ([§13.6.2](statements.md#1362-local-variable-declarations)), including into any nested *embedded-statement*s in the scope.
10641064
10651065
A *variable_reference* to a local variable is a valid referent for a reference variable only if the reference variable is declared within the ref-safe-context of that variable.
10661066
@@ -1160,7 +1160,7 @@ These values form a nesting relationship from narrowest (declaration-block) to w
11601160
For a local variable `v`:
11611161
11621162
- If `v` is a reference variable, its ref-safe-context is the same as the ref-safe-context of its initializing expression.
1163-
- Otherwise its ref-safe-context is the context in which it was declared.
1163+
- Otherwise its ref-safe-context is declaration-block.
11641164
11651165
#### 9.7.2.3 Parameter ref safe context
11661166

0 commit comments

Comments
 (0)