local config = require "config" TEST [[ local function _(x) end function _() () end ]] TEST [[ function _() do return end () end ]] TEST [[ local function a:b() a:b() () end ]] --TEST [[ --function _(...) -- function _() -- print() -- end --end --]] TEST [[ local ( / b)() ]] TEST [[ local io.load(root / .source / 'API' / path) ]] TEST [[ obj[#+1] = {} ]] TEST [[ self = { results = { = {}, } } self[self.results.] = lbl ]] TEST [[ self.results = { = {}, } self[self.results.] = lbl ]] TEST [[ self.results. = {} self[self.results.] = lbl ]] TEST [[ local mt = {} function mt:() end mt:x() mt:() ]] TEST [[ local function func() x = { xx(), , } end ]] TEST [[ local local t = { ..., , } ]] TEST [[ local a local return f(), ]] TEST [[ local a = os.clock() local ?> = os.clock() ]] TEST [[ local mt = {} function mt:(a, b) end local function init() return mt end local t = init() t:() ]] TEST [[ local mt = {} mt.__index = mt function mt:(a, b) end local function init() return setmetatable({}, mt) end local t = init() t:() ]] TEST [[ local t = {} t. = 1 t. = t.f1 print(t.) ]] TEST [[ local t = {} t. = 1 t. = t.f1 t. = t.f2 print(t.) ]] TEST [[ ---@type string string.xx = '' string.xx:() ]] --TEST [[ -----@class Foo --Foo = {} --function Foo:Constructor() -- self. = 1 --end -- -----@class Foo2: Foo --Foo2 = {} --function Foo2:Constructor() --end -- -----@type Foo2 --local v --v. --]] config.set('Lua.IntelliSense.traceLocalSet', true) TEST [[ local A, B function A:get1() local = B:get() return end function A:get2() local = B:get() return end function A:get3() local = B:get() return end function A:get4() local = B:get() return end function A:get5() local = B:get() return end function A:get6() local = B:get() return end function A:get7() local = B:get() return end function A:get8() local = B:get() return end function B:get() local = A:get1() = A:get2() = A:get3() = A:get4() = A:get5() = A:get6() = A:get7() = A:get8() return end local = B:get() print() ]] config.set('Lua.IntelliSense.traceLocalSet', false) TEST [[ g[a.b.c] = 1 print(g.) ]] TEST [[ local function f() return '' end local ?> = '' ]] TEST [[ local t, a local = t[a] t[a] = ]] TEST [[ ---@class A ---@field x number ---@class B: A ---@field boolean ---@type B local t local !> = t.x ]] TEST [[ ---@class A ---@field number ---@class B: A ---@type B local t local !> = t.x ]] TEST [[ ---@class A local A function A:x() end ---@class B: A local B function B:() end ---@type B local t local !> = t.x ]] TEST [[ ---@class A local A function A:() end ---@class B: A local B ---@type B local t local !> = t.x ]] -- TODO --TEST [[ -----@class A --local A -- -----@return A --function A:x() end -- -----@class B: A --local -- -----@return B --function B:x() end -- -----@type B --local t -- --local !> = t.x() --]]