Labels at the end of a statement are called "back-labels", as a special case these can be jumped to even if there is a local variable declaration in the block between the goto statement and the label declaration. E.g.
do
goto L
local a = 2
::L::
end
There is a bug in label declaration processing which means this is allowed erroneously if the block end in a return statement, i.e.
Labels at the end of a statement are called "back-labels", as a special case these can be jumped to even if there is a local variable declaration in the block between the goto statement and the label declaration. E.g.
There is a bug in label declaration processing which means this is allowed erroneously if the block end in a
return
statement, i.e.This PR disallows the latter.