summaryrefslogtreecommitdiff
path: root/test-beta/hover
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-11-14 17:15:03 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-11-14 17:15:03 +0800
commitccb4713315893ccb6e98e391ffaa08269258fd20 (patch)
tree84287464e21a18bdae44a0f248fbc36d2bd8590c /test-beta/hover
parent50c78c90cdfc188ab473bd12e17752d2101d5f05 (diff)
downloadlua-language-server-ccb4713315893ccb6e98e391ffaa08269258fd20.zip
更新对 field 的支持
Diffstat (limited to 'test-beta/hover')
-rw-r--r--test-beta/hover/init.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/test-beta/hover/init.lua b/test-beta/hover/init.lua
index 5a68edd5..664cb0c0 100644
--- a/test-beta/hover/init.lua
+++ b/test-beta/hover/init.lua
@@ -1349,3 +1349,31 @@ function t.<?f?>() end
(2 个定义,1 个原型)
(2) function c.f()
]]
+
+TEST [[
+---@class C
+---@field field any
+
+---@type C
+local <?c?>
+]]
+[[
+local c: C {
+ field: any,
+}
+]]
+
+TEST [[
+---@class C
+---@field field any
+
+---@return C
+local function f() end
+
+local <?c?> = f()
+]]
+[[
+local c: C {
+ field: any,
+}
+]]