diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2023-08-14 15:16:43 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2023-08-14 15:16:43 +0800 |
commit | 5ccedb1cf07a73a8e0eb4ace84b320c8a997dbbb (patch) | |
tree | 24aa7115913a56d8bba3575c1a92835ca4ca3108 /test/diagnostics | |
parent | 01a741f8416f074199303235eb533b8f3446e85b (diff) | |
download | lua-language-server-5ccedb1cf07a73a8e0eb4ace84b320c8a997dbbb.zip |
check `doc.field`
#1990
Diffstat (limited to 'test/diagnostics')
-rw-r--r-- | test/diagnostics/inject-field.lua | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/diagnostics/inject-field.lua b/test/diagnostics/inject-field.lua index 2c802270..f4d847e9 100644 --- a/test/diagnostics/inject-field.lua +++ b/test/diagnostics/inject-field.lua @@ -39,3 +39,26 @@ local m m.xx = 1 -- OK m.yy = 1 -- OK ]] + +TEST [[ +---@class Class +---@field x number + +---@type Class +local t + +t.x = 1 -- OK +t.<!y!> = 2 -- Warning +]] + +TEST [[ +---@class Class +---@field x number +---@field [any] any + +---@type Class +local t + +t.x = 1 -- OK +t.y = 2 -- OK +]] |