summaryrefslogtreecommitdiff
path: root/script/vm/compiler.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-23 23:24:23 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-23 23:24:23 +0800
commit3f815c836beb054a13f8d250f6f05a54778b72ba (patch)
tree04e39933feecbc34cd8ef36c86f838ea8181c635 /script/vm/compiler.lua
parenta7afda10d2ea044a8ea3c83d4656736a6969a101 (diff)
downloadlua-language-server-3f815c836beb054a13f8d250f6f05a54778b72ba.zip
new diagnostic: `need-check-nil`
Diffstat (limited to 'script/vm/compiler.lua')
-rw-r--r--script/vm/compiler.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index 4917d33a..1f33a784 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -1435,9 +1435,8 @@ local compilerSwitch = util.switch()
elseif r1 == false then
vm.setNode(source, node1)
else
- vm.getNode(source):merge(node1)
- vm.getNode(source):setTruly()
vm.getNode(source):merge(node2)
+ vm.getNode(source):addOptional()
end
end
if source.op.type == 'or' then