summaryrefslogtreecommitdiff
path: root/server/test/hover/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server/test/hover/init.lua')
-rw-r--r--server/test/hover/init.lua44
1 files changed, 44 insertions, 0 deletions
diff --git a/server/test/hover/init.lua b/server/test/hover/init.lua
index 0d2180bb..bdd26932 100644
--- a/server/test/hover/init.lua
+++ b/server/test/hover/init.lua
@@ -480,3 +480,47 @@ TEST[[
[[
global x: *Class
]]
+
+TEST[[
+local t = {
+ ---@class Class
+ <?x?> = class()
+}
+]]
+[[
+field x: *Class
+]]
+
+TEST[[
+---@type Class
+local <?x?> = class()
+]]
+[[
+local x: *Class
+]]
+
+TEST[[
+---@type Class
+<?x?> = class()
+]]
+[[
+global x: *Class
+]]
+
+TEST[[
+local t = {
+ ---@type Class
+ <?x?> = class()
+}
+]]
+[[
+field x: *Class
+]]
+
+TEST[[
+---@type A|B|C
+local <?x?> = class()
+]]
+[[
+local x: *A|B|C
+]]