TEST [[ ---@class ---@class B : ]] TEST [[ ---@class ---@type B| ]] TEST [[ ---@class Class local ?> ---@type Class local x ]] TEST [[ ---@class Class local ---@type Class local ?> ]] TEST [[ ---@class A local mt = {} function mt:() end ---@type A local obj obj:() ]] TEST [[ ---@class A local = {} function mt:cast() end ---@type A local :cast() ]] TEST [[ ---@type A local ?> ---@class A local ]] TEST [[ ---@type A local obj obj:() ---@class A local mt function mt:() end ]] TEST [[ ---@type A local obj obj:() local mt = {} mt.__index = mt function mt:() end ---@class A local obj = setmetatable({}, mt) ]] TEST [[ ---@alias A ---@type ]] TEST [[ ---@class ---@param a ]] TEST [[ ---@param f function t(?>) end ]] TEST [[ ---@overload ---@param x number ---@param y boolean ---@param z string function (x, y, z) end print() ]] TEST [[ local function f() return 1 end ---@class Class local ---@type Class local ?> = f() ]] -- TODO do return end TEST [[ ---@class Class ---@field ---@field id integer local mt = {} mt. ]] TEST [[ ---@class loli local unit function unit:() end ---@see loli# ]]