diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-05-23 17:22:58 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-05-23 17:22:58 +0800 |
commit | 83f2b383bb2d1bc2defca63b6dd34d7f5875eef0 (patch) | |
tree | 9831f47e65daa7d42700906d9275e3563bdc4635 /script/vm | |
parent | 25a78532b67032176b6c255019c203927cd004b4 (diff) | |
download | lua-language-server-83f2b383bb2d1bc2defca63b6dd34d7f5875eef0.zip |
fix can not union `unknown` with other types
Diffstat (limited to 'script/vm')
-rw-r--r-- | script/vm/infer.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/script/vm/infer.lua b/script/vm/infer.lua index fabc9828..dba46ffc 100644 --- a/script/vm/infer.lua +++ b/script/vm/infer.lua @@ -76,7 +76,9 @@ local viewNodeSwitch = util.switch() : case 'global' : call(function (source, infer) if source.cate == 'type' then - infer._hasClass = true + if source.name ~= 'unknown' then + infer._hasClass = true + end if source.name == 'number' then infer._hasNumber = true end |