Skip to content

让@overload影响实现 #1582

@xiangnanscu

Description

@xiangnanscu

如下定义,然后 return nil, 'some error'不会有波浪线提示错误

---@return string, number
---@overload fun(): nil, string
local function foo11()
  do
    return 'foo', 1
  end

  do
    return nil, 'some error'
  end
end

讨论见:
#1579

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfeat/type checkRelated to the type checking feature

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions