Open
Description
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?
Type Checking
Expected Behaviour
local A = {}
---@class B
---@overload fun(): B
local B = {}
---@class C
---@overload fun(): C
local C = {}
A.property1 = B()
A.property1.property2 = C()
local refToB = A.property1
local refToC = refToB.property2
while the local refToB
is correctly of type B
, it no longer is aware of property2.
expected behavior would be that it is aware of the properties assigned to the instance.
Actual Behaviour
presence of property is lost in the "instance" of object B (not definition).
Reproduction steps
- Go to '...'
- Click '...'
- See error '...'
Additional Notes
No response
Log File
No response