How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Windows
What is the issue affecting?
Diagnostics/Syntax Checking
Expected Behaviour
Syntax squiggles, notifying invalid Lua code, if the version is set to Lua 5.2, Lua 5.1 or Lua JIT.
Expected error: lua5.1: luatest.lua:9: ambiguous syntax (function call x new statement) near '('
Actual Behaviour
Syntax is accepted, as it would be expected for Lua 5.3 and Lua 5.4.
Reproduction steps
local function nestedFunction(name)
return function(f)
f()
end
end
nestedFunction "My function"
(function ()
print "Hello"
end)
Additional Notes
Correct function call for 5.2 and prior would be:
nestedFunction "My function" (
function ()
print "Hello"
end)
Log File
No response
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Windows
What is the issue affecting?
Diagnostics/Syntax Checking
Expected Behaviour
Syntax squiggles, notifying invalid Lua code, if the version is set to Lua 5.2, Lua 5.1 or Lua JIT.
Expected error:
lua5.1: luatest.lua:9: ambiguous syntax (function call x new statement) near '('Actual Behaviour
Syntax is accepted, as it would be expected for Lua 5.3 and Lua 5.4.
Reproduction steps
Additional Notes
Correct function call for 5.2 and prior would be:
Log File
No response