summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-20 17:53:25 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-20 17:53:25 +0800
commite56f864d92fdd50d12abb04313e33593723613da (patch)
treec1d47c0131b0858b6feb82751b0da9b4c8027f8d /test
parent98dc89fb24baa919c701313c8546cd4a06c643b9 (diff)
downloadlua-language-server-e56f864d92fdd50d12abb04313e33593723613da.zip
`LuaDoc`: supports `['string']` as field:
Diffstat (limited to 'test')
-rw-r--r--test/definition/luadoc.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/definition/luadoc.lua b/test/definition/luadoc.lua
index 5380f4ca..22a51845 100644
--- a/test/definition/luadoc.lua
+++ b/test/definition/luadoc.lua
@@ -667,3 +667,18 @@ local t
print(t[<?1?>])
]]
+
+TEST [[
+---@class A
+---@field <!['xx']!>? boolean
+local t
+
+print(t.<?xx?>)
+]]
+
+TEST [[
+---@type { <!['xx']?: boolean!> }
+local t
+
+print(t.<?xx?>)
+]]