diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-05-18 12:03:54 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-05-18 12:03:54 -0300 |
commit | 6d53701c7a0dc4736d824fd891ee6f22265d0d68 (patch) | |
tree | 74876c6991b50c0327012e9cb9a3dc282925767d /manual | |
parent | abbae57c7844b1121e7251d56f681394f20c1821 (diff) | |
download | lua-6d53701c7a0dc4736d824fd891ee6f22265d0d68.tar.gz lua-6d53701c7a0dc4736d824fd891ee6f22265d0d68.tar.bz2 lua-6d53701c7a0dc4736d824fd891ee6f22265d0d68.zip |
Proper error message when jumping into 'global *'
A goto cannot jump into the scope of any variable declaration,
including 'global *'. To report the error, it needs a "name" for
the scope it is entering.
Diffstat (limited to 'manual')
-rw-r--r-- | manual/manual.of | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/manual/manual.of b/manual/manual.of index eb97e853..a6361fa2 100644 --- a/manual/manual.of +++ b/manual/manual.of | |||
@@ -1504,7 +1504,7 @@ labels in Lua are considered statements too: | |||
1504 | A label is visible in the entire block where it is defined, | 1504 | A label is visible in the entire block where it is defined, |
1505 | except inside nested functions. | 1505 | except inside nested functions. |
1506 | A goto can jump to any visible label as long as it does not | 1506 | A goto can jump to any visible label as long as it does not |
1507 | enter into the scope of a local variable. | 1507 | enter into the scope of a variable declaration. |
1508 | A label should not be declared | 1508 | A label should not be declared |
1509 | where a previous label with the same name is visible, | 1509 | where a previous label with the same name is visible, |
1510 | even if this other label has been declared in an enclosing block. | 1510 | even if this other label has been declared in an enclosing block. |