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.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user