diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2024-07-15 14:16:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-15 14:16:26 +0800 |
commit | 8dd27106bb3c07f0a63a18dba76ef4a66ea8bf74 (patch) | |
tree | f152c27a73a9623fe64601557fbcb2b8bb63b8c0 /test/diagnostics | |
parent | e558d6e3ed61feffa65314a9464feda742e12b1c (diff) | |
parent | 3d88f3313263f316834b2e9e0de47485a4a8d3f3 (diff) | |
download | lua-language-server-8dd27106bb3c07f0a63a18dba76ef4a66ea8bf74.zip |
Merge branch 'master' into fixes-a-specific-case-for-getVisibleType
Diffstat (limited to 'test/diagnostics')
-rw-r--r-- | test/diagnostics/invisible.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/diagnostics/invisible.lua b/test/diagnostics/invisible.lua index 3c0ee3fb..4bb70fcc 100644 --- a/test/diagnostics/invisible.lua +++ b/test/diagnostics/invisible.lua @@ -138,6 +138,28 @@ print(t2._id) ]] config.set(nil, 'Lua.doc.protectedName', nil) +config.set(nil, 'Lua.doc.regengine', 'lua' ) +config.set(nil, 'Lua.doc.privateName', { '^_[%w_]*%w$' }) +config.set(nil, 'Lua.doc.protectedName', { '^_[%w_]*_$' }) +TEST [[ +---@class A +---@field _id_ number +---@field _user number + +---@type A +local t +print(t.<!_id_!>) +print(t.<!_user!>) + +---@class B: A +local t2 +print(t2._id_) +print(t2.<!_user!>) +]] +config.set(nil, 'Lua.doc.privateName', nil) +config.set(nil, 'Lua.doc.protectedName', nil) +config.set(nil, 'Lua.doc.regengine', nil ) + TEST [[ ---@class A ---@field private x number |