Skip to content

New @overload fun():Class doesnt work on globals #1092

@mkster

Description

@mkster

Describe the bug
I tried the new constructor overload but it only works with local classes like in the example

To Reproduce
try this:

---@class Class
---@overload fun():Class
---@field bla number
mt = {} --this is global instead

local x = mt() --> x is unknown

Environment (please complete the following information):

  • OS: Windows
  • Client: VSCode

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfeat/LuaCats AnnotationsRelated to Lua Language Server Annotations (LuaCats)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions