Skip to content

Cannot infer value type #1341

Open
Open
@Nexela

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

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