-
-
Notifications
You must be signed in to change notification settings - Fork 384
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Hover sometimes show wrong class name for variables.
To Reproduce
Open this code in editor and hover on unit variable in different places
Hover show different class for variable in different places
This also affects diagnostics, but autocomplete works flawlessly
---@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
local unit = CreateTestUnit()
local unit_name = unit:GetUnitName()
local health = unit:GetHealth()
unit.test = 1
unit.test2 = 2
unit.testField = 3
if unit.testField then
local test = unit.testField
end
Expected behavior
Expected unit var always have type CDOTA_BaseNPC
Environment :
- OS: Windows 10
- Client: VSCode
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working