Skip to content

Cannot infer value type #1341

Description

@Nexela

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

image
bug.log

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfeat/genericRelated to generic emulation feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions