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
If you write it like that you lose the type information when hovering:
I also tried writing it as ---@overload fun(self, s : string), but then you see self as any.
Also if you don't use a union type (e.g. use D instead of C|D) then the example works fine, and you see self : A when hovering, so there's something inconsistent with union types:
I'm not sure if your issue is related since I don't know how these features are implemented. Could be!
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?
Diagnostics/Syntax Checking
Expected Behaviour
I expect the following example to work without any issues (it worked in the past):
There should be no errors when calling the function overload
var:func('hi')
Actual Behaviour
Reproduction steps
Try the example above with the latest VS Code extension
Additional Notes
From my testing, it only seems to happen when all of the following features are combined:
C
is a child ofB
which is a child ofA
)C|D
)@overload fun(self : A, s : string)
)Log File
No response
The text was updated successfully, but these errors were encountered: