---@class MyClass
---@class MyInheritedClass : MyClass
---@field test fun(): void
---@return TypeGuard<MyInheritedClass>
function typeguard(instance)
return true
end
---@type MyClass
local instance = {}
if typeguard(instance) then
instance:test() -- this is MyClass still, this is a warning! Undefined field `test`.
---@cast instance MyInheritedClass
instance:test()
end
Tested on the latest update, and also #1017, both have this issue
Tested on the latest update, and also #1017, both have this issue