summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-22 14:32:11 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-22 14:32:11 +0800
commite7c4777ace613736d101927ccc6f5c877f89a611 (patch)
tree6beb04d45d4ff4505ff5a138c137e8b43e63d2f7 /test
parentad535a757d103803263af403b463f5201b22c3f0 (diff)
downloadlua-language-server-e7c4777ace613736d101927ccc6f5c877f89a611.zip
fix
Diffstat (limited to 'test')
-rw-r--r--test/hover/init.lua42
1 files changed, 41 insertions, 1 deletions
diff --git a/test/hover/init.lua b/test/hover/init.lua
index 7fec9254..a97cf3ae 100644
--- a/test/hover/init.lua
+++ b/test/hover/init.lua
@@ -810,7 +810,28 @@ TEST [[
next: function,
os: oslib,
package: packagelib,
- ...(+22)
+ pairs: function,
+ pcall: function,
+ print: function,
+ rawequal: function,
+ rawget: function,
+ rawlen: function,
+ rawset: function,
+ require: function,
+ select: function,
+ setfenv: function,
+ setmetatable: function,
+ string: stringlib,
+ table: tablelib,
+ tonumber: function,
+ tostring: function,
+ type: function,
+ unpack: function,
+ utf8: utf8lib,
+ warn: function,
+ xpcall: function,
+ _G: _G,
+ _VERSION: string = "Lua 5.4",
}
]]
@@ -1990,3 +2011,22 @@ local n3 = <?f?>(0, 0)
[[
local f: fun(x: number, y: number):string
]]
+
+TEST [[
+---@class A
+local mt
+
+---@type integer
+mt.x = 1
+
+mt.y = true
+
+---@type A
+local <?t?>
+]]
+[[
+local t: A {
+ x: integer,
+ y: boolean = true,
+}
+]]