Skip to content

局部变量和函数参数的推导差异 #957

@tinyleolin

Description

@tinyleolin
---@param t table
function f(t)
    local i = 0
    i = 1.0 + t.a
    local j = 0
    ---@type table
    local m
    j = 2.0 + m.a
end
Image

另外,有没可能把"number to integer的类型不匹配错误信息"单独分类,这样可以单独忽略掉,用Lua5.1的项目,大多数情况并不区分numberinteger

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions