Functions in Lua 5.1 (and LuaJIT) can only reference up to 60 upvalues.
For example, the following code does not compile in Lua 5.1 ("lua5.1: upvals.lua:4: function at line 3 has more than 60 upvalues") but LuaLS accepts it without any warning when the version is set to 5.1. Ideally this would be handled directly in the parser similar to the 200 local limits.
Functions in Lua 5.1 (and LuaJIT) can only reference up to 60 upvalues.
For example, the following code does not compile in Lua 5.1 ("lua5.1: upvals.lua:4: function at line 3 has more than 60 upvalues") but LuaLS accepts it without any warning when the version is set to 5.1. Ideally this would be handled directly in the parser similar to the 200 local limits.