summaryrefslogtreecommitdiff
path: root/test-beta/hover
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-10-26 16:02:37 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-10-26 16:02:37 +0800
commite70ac18efc00ae438615650f6727693e93830217 (patch)
tree28cb59225e39edcbc78e56c6adb9f4017345c4da /test-beta/hover
parent202d4199114b283abe3f38a63c3d845dd183ce11 (diff)
downloadlua-language-server-e70ac18efc00ae438615650f6727693e93830217.zip
根据函数的 doc.return 分析类型
Diffstat (limited to 'test-beta/hover')
-rw-r--r--test-beta/hover/init.lua13
1 files changed, 12 insertions, 1 deletions
diff --git a/test-beta/hover/init.lua b/test-beta/hover/init.lua
index feb574d4..3104c659 100644
--- a/test-beta/hover/init.lua
+++ b/test-beta/hover/init.lua
@@ -985,7 +985,17 @@ function f(x: <T>)
-> <T>
]]
-do return end
+TEST [[
+---@return number
+local function f()
+end
+
+local <?r?> = f()
+]]
+[[
+local r: number
+]]
+
TEST [[
---@generic T
---@param x T
@@ -999,6 +1009,7 @@ local <?r?> = f(1)
local r: integer
]]
+do return end
TEST [[
---@param x number
---@param y boolean