diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-05-27 17:39:27 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-05-27 17:39:27 +0800 |
commit | 1110e83bb47345a487aa78cc343ef501b86f7d4b (patch) | |
tree | fb15e32cbf03f8363e4fb1fc0a0cebc1ce626728 /test | |
parent | 507bb6852f6ae523dca4370c38cac8581329a2c3 (diff) | |
download | lua-language-server-1110e83bb47345a487aa78cc343ef501b86f7d4b.zip |
update
Diffstat (limited to 'test')
-rw-r--r-- | test/hover/init.lua | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/test/hover/init.lua b/test/hover/init.lua index 7778b6b5..63e2217b 100644 --- a/test/hover/init.lua +++ b/test/hover/init.lua @@ -1068,6 +1068,8 @@ function f(x: number, y: boolean) ]] TEST [[ +---@class Class + ---@vararg Class local function f(...) local _, <?x?> = ... @@ -1079,6 +1081,21 @@ local x: Class ]] TEST [[ +---@class Class + +---@vararg Class +local function f(...) + local t = {...} + local <?v?> = t[1] +end +]] +[[ +local v: Class +]] + +TEST [[ +---@class Class + ---@vararg Class local function f(...) local <?t?> = {...} @@ -1154,23 +1171,29 @@ local x: table<ClassA, ClassB> ]] --TEST [[ +-----@class ClassA +-----@class ClassB +-- -----@type table<ClassA, ClassB> --local t --for _, <?x?> in pairs(t) do --end --]] --[[ ---local x: *ClassB +--local x: ClassB --]] --TEST [[ +-----@class ClassA +-----@class ClassB +-- -----@type table<ClassA, ClassB> --local t --for <?k?>, v in pairs(t) do --end --]] --[[ ---local k: *ClassA +--local k: ClassA --]] TEST [[ |