Skip to content

Commit e558d6e

Browse files
committed
add test
1 parent b77daee commit e558d6e

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

test/diagnostics/invisible.lua

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,43 @@ local t2
8585
8686
print(t2.<!_id!>)
8787
]]
88+
TEST [[
89+
---@class A
90+
local A = {
91+
_id = 0
92+
}
93+
94+
---@type A
95+
local t
96+
97+
print(t.<!_id!>)
98+
99+
---@class B: A
100+
local t2
101+
102+
print(t2.<!_id!>)
103+
]]
104+
88105
config.set(nil, 'Lua.doc.privateName', nil)
89106

90107
config.set(nil, 'Lua.doc.protectedName', { '_*' })
108+
TEST [[
109+
---@class A
110+
local A = {
111+
_id = 0
112+
}
113+
114+
---@type A
115+
local t
116+
117+
print(t.<!_id!>)
118+
119+
---@class B: A
120+
local t2
121+
122+
print(t2._id)
123+
]]
124+
91125
TEST [[
92126
---@class A
93127
---@field _id number

0 commit comments

Comments
 (0)