Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fields and Functions with the same name are not distinct #549

Closed
johnfking opened this issue May 25, 2021 · 0 comments
Closed

Fields and Functions with the same name are not distinct #549

johnfking opened this issue May 25, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@johnfking
Copy link

Describe the bug
When creating a field and a function of the same name (they have different return types), the code completion popup only shows the Function and not the Field.

Sample Code:

`---@Class car @parent class
---@field public body body Retreive the nested body object
local car = {}
---get the body object
---@return string body
function car.body() end

---@Class body : car
local body = {}

--- Number of doors
---@return number
function body.doors() end

--- Style of car
---@return string
function body.style() end`

Expected behavior
I would expect when typing car.b - that the typeahead would show two options distinguished by the symbol for a function and field.

Screenshots
image

Environment (please complete the following information):

  • OS: Windows
  • No
  • Client: VSCode
@sumneko sumneko added the enhancement New feature or request label May 27, 2021
sumneko added a commit that referenced this issue Jul 1, 2021
@sumneko sumneko closed this as completed Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants