summaryrefslogtreecommitdiff
path: root/test-beta/hover/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test-beta/hover/init.lua')
-rw-r--r--test-beta/hover/init.lua26
1 files changed, 26 insertions, 0 deletions
diff --git a/test-beta/hover/init.lua b/test-beta/hover/init.lua
index 43a81fa3..420e4c1d 100644
--- a/test-beta/hover/init.lua
+++ b/test-beta/hover/init.lua
@@ -1257,3 +1257,29 @@ local t: Class {
z: string,
}
]]
+
+TEST [[
+---@class A
+
+---@type <?A?>
+]]
+[[
+class A
+]]
+
+TEST [[
+---@type string | "'enum1'" | "'enum2'"
+local <?t?>
+]]
+[[
+local t: string|'enum1'|'enum2'
+]]
+
+TEST [[
+---@alias A string | "'enum1'" | "'enum2'"
+
+---@type <?A?>
+]]
+[[
+展开为 string|'enum1'|'enum2'
+]]