diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-12-15 21:09:14 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-12-15 21:09:14 +0800 |
commit | 6e2d3d42dba22ee9f179546b1e92d0b3313ec1f5 (patch) | |
tree | 3d32e12c94ca119167e84eb994d859d91c690785 /script/vm/node.lua | |
parent | a744e3439e165be13f8f0ba5262b8f1efec0d86d (diff) | |
download | lua-language-server-6e2d3d42dba22ee9f179546b1e92d0b3313ec1f5.zip |
stash
Diffstat (limited to 'script/vm/node.lua')
-rw-r--r-- | script/vm/node.lua | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/script/vm/node.lua b/script/vm/node.lua index d0fd5ffb..2e408128 100644 --- a/script/vm/node.lua +++ b/script/vm/node.lua @@ -188,6 +188,9 @@ end ---@return vm.node function mt:setFalsy() + if self.optional == false then + self.optional = nil + end local hasBoolean for index = #self, 1, -1 do local c = self[index] @@ -226,10 +229,6 @@ function mt:setFalsy() if hasBoolean then self:merge(vm.declareGlobal('type', 'false')) end - if self.optional then - self.optional = nil - self:merge(vm.declareGlobal('type', 'nil')) - end return self end |