From e558d6e3ed61feffa65314a9464feda742e12b1c Mon Sep 17 00:00:00 2001 From: NeOzay Date: Sat, 13 Jul 2024 17:24:44 +0200 Subject: add test --- test/diagnostics/invisible.lua | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'test/diagnostics') 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,9 +85,43 @@ local t2 print(t2.) ]] +TEST [[ +---@class A +local A = { + _id = 0 +} + +---@type A +local t + +print(t.) + +---@class B: A +local t2 + +print(t2.) +]] + 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.) + +---@class B: A +local t2 + +print(t2._id) +]] + TEST [[ ---@class A ---@field _id number -- cgit v1.2.3