summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-07 16:35:34 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-07 16:35:34 +0800
commit3cdafcc068385ad25325dea8ddd33d1a8b380ba9 (patch)
treefedb59f9ca62947727e8c7303f3f33b5fed090c3 /script
parentfc05060d1716946ef2c8bbcd15b6bdae40dd42ba (diff)
downloadlua-language-server-3cdafcc068385ad25325dea8ddd33d1a8b380ba9.zip
some fix
Diffstat (limited to 'script')
-rw-r--r--script/vm/value.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/script/vm/value.lua b/script/vm/value.lua
index 23a9f2c9..bbae446c 100644
--- a/script/vm/value.lua
+++ b/script/vm/value.lua
@@ -23,10 +23,13 @@ function vm.testCondition(source)
hasFalse = true
end
elseif n.type == 'global' and n.cate == 'type' then
+ if n.name == 'boolean' then
+ return nil
+ end
if n.name == 'false'
or n.name == 'nil' then
hasFalse = true
- elseif n.name ~= 'boolean' then
+ else
hasTrue = true
end
elseif n.type == 'nil' then