Skip to content

Lua template #1243

Description

@Nexela

Using Lua 5.2 but I believe it applies for all the other versions

Missing optional nil return values on next()

local tab = {}---@type {[integer]: {[string]: string}}
local index, value = next(tab)
print(index) -- This line should warn for need check nil
print(value.first) -- This line should warn for need check nil

string.match returns string? (not string|number)

return city_name:match(".*, .*, (.*)") --- Incorrect type warning here

latest Vscode, latest master

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions