summaryrefslogtreecommitdiff
path: root/test/diagnostics
diff options
context:
space:
mode:
authorNeOzay <colpaert.benoit@gmail.com>2024-07-13 17:24:44 +0200
committerNeOzay <colpaert.benoit@gmail.com>2024-07-13 17:24:44 +0200
commite558d6e3ed61feffa65314a9464feda742e12b1c (patch)
tree73ea135cd2a5ff05b5179283ebfbf3e155b65ef5 /test/diagnostics
parentb77daee2d5788c34b48d8ea0c13d754c2d943a3a (diff)
downloadlua-language-server-e558d6e3ed61feffa65314a9464feda742e12b1c.zip
add test
Diffstat (limited to 'test/diagnostics')
-rw-r--r--test/diagnostics/invisible.lua34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/diagnostics/invisible.lua b/test/diagnostics/invisible.lua
index 2fc6791e..3c0ee3fb 100644
--- a/test/diagnostics/invisible.lua
+++ b/test/diagnostics/invisible.lua
@@ -85,11 +85,45 @@ local t2
print(t2.<!_id!>)
]]
+TEST [[
+---@class A
+local A = {
+ _id = 0
+}
+
+---@type A
+local t
+
+print(t.<!_id!>)
+
+---@class B: A
+local t2
+
+print(t2.<!_id!>)
+]]
+
config.set(nil, 'Lua.doc.privateName', nil)
config.set(nil, 'Lua.doc.protectedName', { '_*' })
TEST [[
---@class A
+local A = {
+ _id = 0
+}
+
+---@type A
+local t
+
+print(t.<!_id!>)
+
+---@class B: A
+local t2
+
+print(t2._id)
+]]
+
+TEST [[
+---@class A
---@field _id number
---@type A