The following results in a syntax error on the third line:
function f()
return
::x::
end
Why is it not possible to have a label following a return statement?
A return statement must be the last statement in a block, so just put the return statement in a block:
function f()
do
return
end
::x::
end