diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-06-28 16:21:08 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-06-28 16:21:08 +0800 |
commit | 12c658d8f569c52e88b09aadbd221387364276f4 (patch) | |
tree | c9d917b6ddebdf9443f88a188fa5839d1a243ca7 /server/test | |
parent | 9e875d4ea8ac60939f51771485084c539e66e040 (diff) | |
download | lua-language-server-12c658d8f569c52e88b09aadbd221387364276f4.zip |
允许不占用return
Diffstat (limited to 'server/test')
-rw-r--r-- | server/test/hover/init.lua | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/server/test/hover/init.lua b/server/test/hover/init.lua index 05dc7e16..67188d75 100644 --- a/server/test/hover/init.lua +++ b/server/test/hover/init.lua @@ -824,8 +824,8 @@ function f([x: number [, y: boolean], z: string]) ]=] TEST [[ ----@return string {name = 'key'} ----@return string {name = 'value'} +---@return any {name = 'key'} +---@return any {name = 'value'} function <?f?>() end ]] [=[ @@ -834,12 +834,27 @@ function f() ]=] TEST [[ ----@return string {name = 'x', optional = 'after'} +---@return {name = 'x', optional = 'after'} ---@return string {name = 'y', optional = 'self'} ---@return string {name = 'z'} function <?f?>() end ]] [=[ function f() - -> [x: string [, y: string], z: string] + -> [x: any [, y: string], z: string] +]=] + +TEST [[ +---@return {name = 'x', optional = 'after'} +---@return string {name = 'y', optional = 'self'} +---@return string {name = 'z'} +function f() + return function (a, b) + end +end + +<?f2?> = f() +]] +[=[ +function f2(a: any, b: any) ]=] |