diff options
author | Lei Zhu <uhziel@gmail.com> | 2020-12-23 15:29:05 +0800 |
---|---|---|
committer | Lei Zhu <uhziel@gmail.com> | 2020-12-23 15:29:05 +0800 |
commit | 2ab172bbd6e0f2eeed3388bd69947d3840e5ff15 (patch) | |
tree | 296e6692c7f158fb746c9aca4166d4147a798241 /script | |
parent | cb28b668db32b7afe29c9d01dfcc700b0377e266 (diff) | |
download | lua-language-server-2ab172bbd6e0f2eeed3388bd69947d3840e5ff15.zip |
undefined-field不要检测类型为table的,会出现很多误报
如果确需要它的形状是table,请使用类型 table*
Diffstat (limited to 'script')
-rw-r--r-- | script/core/diagnostics/undefined-field.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/script/core/diagnostics/undefined-field.lua b/script/core/diagnostics/undefined-field.lua index a8fadfed..cf986845 100644 --- a/script/core/diagnostics/undefined-field.lua +++ b/script/core/diagnostics/undefined-field.lua @@ -29,7 +29,7 @@ return function (uri, callback) local allDocClass = {} for i = 1, #infers do local infer = infers[i] - if infer.type ~= '_G' and infer.type ~= 'any' then + if infer.type ~= '_G' and infer.type ~= 'any' and infer.type ~= 'table' then local inferSource = infer.source if inferSource.type == 'doc.class' then addTo(allDocClass, inferSource) |