diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-09-27 19:49:55 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-09-27 19:49:55 +0800 |
commit | 0805d50df822422bcee2b5bf6bfe9067f1a9063a (patch) | |
tree | 7efc4cf4dbba6f0d19263d05c32983ac6a9c1262 /script | |
parent | fcdce9a9660be08ddc5b94c60ce84d5970711a7f (diff) | |
download | lua-language-server-0805d50df822422bcee2b5bf6bfe9067f1a9063a.zip |
dont infers nil
Diffstat (limited to 'script')
-rw-r--r-- | script/core/infer.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/script/core/infer.lua b/script/core/infer.lua index 7ad35643..f6ca6499 100644 --- a/script/core/infer.lua +++ b/script/core/infer.lua @@ -254,6 +254,12 @@ local function cleanInfers(infers) end end infers['any'] = nil + if infers['nil'] then + infers['nil'] = nil + if not next(infers) then + infers['nil'] = true + end + end end ---合并对象的推断类型 |