diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-10-20 20:49:11 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-10-20 20:49:11 +0800 |
commit | 0c7a22d1106cd97b47cb969e2ccfd86ca7ae2629 (patch) | |
tree | 28be218460604922063a2ca9af44f270e77e1c78 /test/crossfile | |
parent | 1c79bbc9d1a238e4cc900c506690e52f8e5f12f2 (diff) | |
download | lua-language-server-0c7a22d1106cd97b47cb969e2ccfd86ca7ae2629.zip |
ignore varargs
if a function only has varargs and has `---@overload`, the varargs will be ignored
resolve #1641
Diffstat (limited to 'test/crossfile')
-rw-r--r-- | test/crossfile/hover.lua | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test/crossfile/hover.lua b/test/crossfile/hover.lua index c3d7078c..6d1f3df6 100644 --- a/test/crossfile/hover.lua +++ b/test/crossfile/hover.lua @@ -1606,3 +1606,41 @@ someType: | "#" -- description ```]] } + +TEST { { path = 'a.lua', content = [[ +---@overload fun(x: number) +---@overload fun(x: number, y: number) +local function <?f?>(...) +end +]] }, +hover = [[ +```lua +function f(x: number) +``` + +--- + +```lua +function f(x: number, y: number) +```]] +} + +TEST { { path = 'a.lua', content = [[ +---@overload fun(x: number) +---@overload fun(x: number, y: number) +local function f(...) +end + +<?f?> +]] }, +hover = [[ +```lua +function f(x: number) +``` + +--- + +```lua +function f(x: number, y: number) +```]] +} |