aboutsummaryrefslogtreecommitdiff
path: root/manual
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-05-18 12:03:54 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-05-18 12:03:54 -0300
commit6d53701c7a0dc4736d824fd891ee6f22265d0d68 (patch)
tree74876c6991b50c0327012e9cb9a3dc282925767d /manual
parentabbae57c7844b1121e7251d56f681394f20c1821 (diff)
downloadlua-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.of2
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:
1504A label is visible in the entire block where it is defined, 1504A label is visible in the entire block where it is defined,
1505except inside nested functions. 1505except inside nested functions.
1506A goto can jump to any visible label as long as it does not 1506A goto can jump to any visible label as long as it does not
1507enter into the scope of a local variable. 1507enter into the scope of a variable declaration.
1508A label should not be declared 1508A label should not be declared
1509where a previous label with the same name is visible, 1509where a previous label with the same name is visible,
1510even if this other label has been declared in an enclosing block. 1510even if this other label has been declared in an enclosing block.