diff options
author | sumneko <sumneko@hotmail.com> | 2019-04-29 20:22:14 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-04-29 20:22:14 +0800 |
commit | eec1da3f170a0fc90844860f0c877e38765466b1 (patch) | |
tree | 35821229794dd6923c4803db64775154b3e9c714 /server/test/hover | |
parent | 9a1b32c07764bfa441d184d97ae90d271bfb9012 (diff) | |
download | lua-language-server-eec1da3f170a0fc90844860f0c877e38765466b1.zip |
emmy.vararg
Diffstat (limited to 'server/test/hover')
-rw-r--r-- | server/test/hover/init.lua | 45 |
1 files changed, 33 insertions, 12 deletions
diff --git a/server/test/hover/init.lua b/server/test/hover/init.lua index 24cf8789..5e46bf26 100644 --- a/server/test/hover/init.lua +++ b/server/test/hover/init.lua @@ -609,15 +609,36 @@ function f() -> A|B, C ]] ---TEST [[ ------@generic T ------@param x T ------@return T ---local function f(x) ---end --- ---local <?r?> = f(1) ---]] ---[[ ---local r: number = 1 ---]] +TEST [[ +---@generic T +---@param x T +---@return T +local function f(x) +end + +local <?r?> = f(1) +]] +[[ +local r: number +]] + +TEST [[ +---@vararg Class +local function f(...) + local _, <?x?> = ... +end +f(1, 2, 3) +]] +[[ +local x: *Class = 2 +]] + +TEST [[ +---@vararg Class +local function f(...) + local _, <?x?> = ... +end +]] +[[ +local x: *Class {} +]] |