summaryrefslogtreecommitdiff
path: root/test/hover
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-08-08 20:24:54 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-08-08 20:24:54 +0800
commit9b5ac5353c6c63e09d7b8862fb9f5535d5f014fb (patch)
tree72b1aa863bd7d92a5ba5ba9ce95f78f170ebb1c1 /test/hover
parent35c3ffc8690b265e93b37575989206e15275b5a9 (diff)
downloadlua-language-server-9b5ac5353c6c63e09d7b8862fb9f5535d5f014fb.zip
fix #1409
Diffstat (limited to 'test/hover')
-rw-r--r--test/hover/init.lua33
1 files changed, 16 insertions, 17 deletions
diff --git a/test/hover/init.lua b/test/hover/init.lua
index 40474bf5..e720ffc2 100644
--- a/test/hover/init.lua
+++ b/test/hover/init.lua
@@ -5,22 +5,6 @@ local config = require 'config'
rawset(_G, 'TEST', true)
-local accept = {
- ['local'] = true,
- ['setlocal'] = true,
- ['getlocal'] = true,
- ['setglobal'] = true,
- ['getglobal'] = true,
- ['field'] = true,
- ['method'] = true,
- ['string'] = true,
- ['number'] = true,
- ['integer'] = true,
- ['doc.type.name'] = true,
- ['doc.class.name'] = true,
- ['function'] = true,
-}
-
---@diagnostic disable: await-in-sync
function TEST(script)
return function (expect)
@@ -312,7 +296,6 @@ end
]]
[[
function x()
- -> unknown
]]
TEST [[
@@ -2137,3 +2120,19 @@ local <?x?> = 1 << 2
[[
local x: integer = 4
]]
+
+TEST [[
+local function test1()
+ return 1, 2, 3
+end
+
+local function <?test2?>()
+ return test1()
+end
+]]
+[[
+function test2()
+ -> integer
+ 2. integer
+ 3. integer
+]]