lua-language-server
lua-language-server copied to clipboard
Cannot infer value type
Latest Vscode, Latest Master
---@generic V: string
---@param list V[]
---@return {[V]: true}
util.list_to_map = function(list)
local map = {}
for k, value in pairs(list) do
map[value] = true
end
return map
end
This is caused by the current generic implementation defect, and the generic implementation needs to be refactored in the future.