Open ChouUn opened 3 weeks ago
similar issue: https://github.com/LuaLS/lua-language-server/issues/2791
And as a bonus case for the code snippet above:
--[[
Usage 4: incorrect
]]
local x
local y = t[x] -- expected: unknown, got: number
seems when using unknown
key to index this table, it will incorrectly infer as number
as well
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?
Type Checking
Expected Behaviour
expected the value type of mapping when index
Actual Behaviour
got an unknown
Reproduction steps
Additional Notes
No response
Log File
No response