diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-11-08 20:17:04 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-11-08 20:17:04 +0800 |
commit | 9585ac191f61d72dd198edec139b955276a53072 (patch) | |
tree | 8497952d1ea937cae6a8e4959a1e39223d86fc94 /test/hover/init.lua | |
parent | 90763c00c9960a8776e046c45a9f87d348ebc3d1 (diff) | |
download | lua-language-server-9585ac191f61d72dd198edec139b955276a53072.zip |
resolve #708 resolve #767
Diffstat (limited to 'test/hover/init.lua')
-rw-r--r-- | test/hover/init.lua | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/test/hover/init.lua b/test/hover/init.lua index d2a6e084..d5c47ddf 100644 --- a/test/hover/init.lua +++ b/test/hover/init.lua @@ -1118,6 +1118,45 @@ local t: Class[] ]] TEST [[ +---@class Class + +---@param ... Class +local function f(...) + local _, <?x?> = ... +end +f(1, 2, 3) +]] +[[ +local x: Class +]] + +TEST [[ +---@class Class + +---@param ... Class +local function f(...) + local t = {...} + local <?v?> = t[1] +end +]] +[[ +local v: Class +]] + +TEST [[ +---@class Class + +---@param ... Class +local function f(...) + local <?t?> = {...} +end +f(1, 2, 3) +]] +[[ +local t: Class[] +]] + +TEST [[ ---@type string[] local <?x?> ]] @@ -1454,7 +1493,7 @@ TEST [[ local function f(<?callback?>) end ]] [[ -local callback: fun(x: integer, ...: nil) +local callback: fun(x: integer, ...: any) ]] TEST [[ |