diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-07-06 20:49:07 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-07-06 20:49:07 +0800 |
commit | 73c4266110bd1013610db15a7e19d40498687b09 (patch) | |
tree | 2e017e058cc38003beeb128b44adf263e03b1f56 /script | |
parent | c3a596e3056315bb2501351aaa049a19bc91b6e8 (diff) | |
download | lua-language-server-73c4266110bd1013610db15a7e19d40498687b09.zip |
fix may infer a custom class as a string
Diffstat (limited to 'script')
-rw-r--r-- | script/core/infer.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/script/core/infer.lua b/script/core/infer.lua index aa1e1f28..c4af5122 100644 --- a/script/core/infer.lua +++ b/script/core/infer.lua @@ -244,7 +244,9 @@ local function cleanInfers(infers) -- 如果是通过 # 来推测的,且结果里没有其他的 table 与 string,则加入这2个类型 if infers[STRING_OR_TABLE] then infers[STRING_OR_TABLE] = nil - if not infers['table'] and not infers['string'] then + if not infers['table'] + and not infers['string'] + and not infers[CLASS] then infers['table'] = true infers['string'] = true end |