summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-22 14:14:58 +0800
committersumneko <sumneko@hotmail.com>2019-04-22 14:14:58 +0800
commitadb221773bbfffcec5e486a8e4f52e44d594508b (patch)
treef8ef486c18099477ef4f764a355e9da4770c98b9
parent6e3b65b7e02d70d608a4b9bfac08d52a53abf179 (diff)
downloadlua-language-server-adb221773bbfffcec5e486a8e4f52e44d594508b.zip
修正一个意外清除value.info的bug
-rw-r--r--server/src/vm/value.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/server/src/vm/value.lua b/server/src/vm/value.lua
index 783bfc4e..20e6f5d7 100644
--- a/server/src/vm/value.lua
+++ b/server/src/vm/value.lua
@@ -225,10 +225,10 @@ function mt:flushChild()
local count = 0
for srcId, info in pairs(infos) do
local src = listMgr.get(srcId)
- if src
- and (info.type == 'set child' or info.type == 'get child')
- then
- alived[info[1]] = true
+ if src then
+ if info.type == 'set child' or info.type == 'get child' then
+ alived[info[1]] = true
+ end
count = count + 1
else
infos[srcId] = nil
@@ -539,6 +539,7 @@ function mt:setEmmy(emmy)
return
end
self._emmy = emmy
+ self:markGlobal()
end
function mt:getEmmy()