summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
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 34d24cf2..5380f4ca 100644
--- a/test/definition/luadoc.lua
+++ b/test/definition/luadoc.lua
@@ -652,3 +652,18 @@ local t
print(t.<?x?>)
]]
+
+TEST [[
+---@class A
+---@field <![1]!>? boolean
+local t
+
+print(t[<?1?>])
+]]
+
+TEST [[
+---@type { <![1]?: boolean!> }
+local t
+
+print(t[<?1?>])
+]]