Skip to content

Autocompletion not working in function for nested class #562

@asleire

Description

@asleire

Hi, sorry if someone else opened an issue like this. I wasn't sure what to search for.

Describe the bug
Autocomplete doesn't show myField in the method Root.Class:Print()

To Reproduce

---@class Root
Root = {}

---@class Root.Class
---@field myField string
Root.Class = {
    myField = ""
}

function Root.Class:Print() 
    print(self.) -- Autocomplete after self. doesn't show "myField"
end

Expected behavior
Autocomplete should show myField when typing self. in the method Root.Class:Print()

Screenshots
Autocomplete currently looks like this:
image

Autocomplete should look like this:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions