summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-02-23 20:37:59 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-02-23 20:37:59 +0800
commit64b7635a5022a13df67acc5632497d75b3c378c7 (patch)
treefe57f8416adbf4a4026d8fe1e590fa482e59ae16 /test
parent811a2f24aba428bad5e9e0d30860202e780ec0d2 (diff)
downloadlua-language-server-64b7635a5022a13df67acc5632497d75b3c378c7.zip
improve doc.type.table
Diffstat (limited to 'test')
-rw-r--r--test/type_inference/init.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 5760af26..ecdb17a8 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -369,3 +369,19 @@ TEST 'table' [[
local t = {}
local <?v?> = setmetatable(t)
]]
+
+TEST [[CCC]] [[
+---@class CCC
+
+---@type table<string, CCC>
+local t = {}
+
+print(t.<?a?>)
+]]
+
+TEST '"aaa"|"bbb"' [[
+---@type table<string, '"aaa"'|'"bbb"'>
+local t = {}
+
+print(t.<?a?>)
+]]