From 6d53701c7a0dc4736d824fd891ee6f22265d0d68 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Sun, 18 May 2025 12:03:54 -0300 Subject: 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. --- manual/manual.of | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manual') 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: A label is visible in the entire block where it is defined, except inside nested functions. A goto can jump to any visible label as long as it does not -enter into the scope of a local variable. +enter into the scope of a variable declaration. A label should not be declared where a previous label with the same name is visible, even if this other label has been declared in an enclosing block. -- cgit v1.2.3-55-g6feb