diff options
author | NeOzay <colpaert.benoit@gmail.com> | 2024-07-24 18:01:44 +0200 |
---|---|---|
committer | NeOzay <colpaert.benoit@gmail.com> | 2024-07-24 18:01:44 +0200 |
commit | c08410458924a9f3c604e662cfce80f0f86d5b78 (patch) | |
tree | ae6c48e1a0236036e914a6a28b0ad0d96621787b /test/diagnostics | |
parent | 7582afd72f6d111f81b9c48caf43bafa80a1887a (diff) | |
download | lua-language-server-c08410458924a9f3c604e662cfce80f0f86d5b78.zip |
also detects missing index fields
Diffstat (limited to 'test/diagnostics')
-rw-r--r-- | test/diagnostics/missing-fields.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/diagnostics/missing-fields.lua b/test/diagnostics/missing-fields.lua index f1b1beae..8c1ffbbb 100644 --- a/test/diagnostics/missing-fields.lua +++ b/test/diagnostics/missing-fields.lua @@ -334,4 +334,22 @@ local x = <!{ bb = 2, bd = 4, }!> +]] + +TEST[[ +---@class A +---@field [1] string +---@field x number + +---@type A +local t = {x = 1, ""} +]] + +TEST[[ +---@class A +---@field [1] string +---@field x number + +---@type A +local t = <!{x = 1}!> ]]
\ No newline at end of file |