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
Describe the bug
Undefined field diagnostic broken in some cases
To Reproduce
Open code in editor. If you uncomment ---@type annotation all works fine
I guess something wrong with types inference
---@class CEntityInstance
CEntityInstance = {}
---@class CBaseEntity:CEntityInstance
CBaseEntity = {}
---@class CBaseModelEntity:CBaseEntity
CBaseModelEntity = {}
---@class CBaseAnimating:CBaseModelEntity
CBaseAnimating = {}
---@class CBaseFlex:CBaseAnimating
CBaseFlex = {}
---@class CDOTA_BaseNPC:CBaseFlex
CDOTA_BaseNPC = {}
---@return string
function CDOTA_BaseNPC:GetUnitName() end
---@return number
function CDOTA_BaseNPC:GetHealth() end
---@return CDOTA_BaseNPC
function CreateTestUnit() end
-----@type CDOTA_BaseNPC
local unit = CreateTestUnit()
unit.testField = 3
if unit.testField then
local test = unit.testField
end
Screenshots
Environment
OS: Windows 10
Client: VSCode
The text was updated successfully, but these errors were encountered:
Describe the bug
Undefined field diagnostic broken in some cases
To Reproduce
Open code in editor. If you uncomment ---@type annotation all works fine
I guess something wrong with types inference
Screenshots

Environment
The text was updated successfully, but these errors were encountered: