diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2023-08-14 15:07:49 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2023-08-14 15:07:49 +0800 |
commit | 01a741f8416f074199303235eb533b8f3446e85b (patch) | |
tree | f2822f3f76500855879ba2515b097405df5a2327 /test | |
parent | 63edb992a363a97dfa3f02a988f5f7771d5b0b03 (diff) | |
download | lua-language-server-01a741f8416f074199303235eb533b8f3446e85b.zip |
also check `doc.type.table`
Diffstat (limited to 'test')
-rw-r--r-- | test/diagnostics/inject-field.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/diagnostics/inject-field.lua b/test/diagnostics/inject-field.lua index 8e2273b5..2c802270 100644 --- a/test/diagnostics/inject-field.lua +++ b/test/diagnostics/inject-field.lua @@ -23,3 +23,19 @@ local m m.xx = 1 -- OK m.yy = 1 -- OK ]] + +TEST [[ +---@type { xx: number } +local m + +m.xx = 1 -- OK +m.<!yy!> = 1 -- Warning +]] + +TEST [[ +---@type { xx: number, [any]: any } +local m + +m.xx = 1 -- OK +m.yy = 1 -- OK +]] |