You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When providing an alias for a function in a table, the alias should be treated as a function.
Actual Behaviour
When providing an alias for a function in a table, the alias is treated as a field and does not get completed as a function. Hover shows that the field is a function, but completion does not agree or complete with parentheses.
Reproduction steps
Use the below code
---@classmyTablelocalt= {}
---Does a thing---@paramainteger---@parambstring---@paramcbooleanfunctiont.myFunc(a, b, c) endt.myAlias=t.myFunc
Try to get completions for the functiont.myAlias
Additional Notes
This would be incredibly useful for aliasing a function — something that luassert does a lot.
Log File
No response
The text was updated successfully, but these errors were encountered:
carsakiller
changed the title
Field assigned to function should be completed as function
Function assigned to field should be completed as function
Sep 20, 2022
localt= {}
t.f=function () endt.f=function (x) endt.f=function (x, y) endt.f--> Shows 3 items `f()`, `f(x)` and `f(x, y)` here, based on 3 `setfield`t.g=t.ft.g--> Only have 1 `setfield`, I can not expand it into 3 items
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Windows
What is the issue affecting?
Completion
Expected Behaviour
When providing an alias for a function in a table, the alias should be treated as a function.
Actual Behaviour
When providing an alias for a function in a table, the alias is treated as a field and does not get completed as a function. Hover shows that the field is a function, but completion does not agree or complete with parentheses.
Reproduction steps
t.myAlias
Additional Notes
This would be incredibly useful for aliasing a function — something that luassert does a lot.
Log File
No response
The text was updated successfully, but these errors were encountered: