diff options
author | sumneko <sumneko@hotmail.com> | 2019-04-22 14:14:58 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-04-22 14:14:58 +0800 |
commit | adb221773bbfffcec5e486a8e4f52e44d594508b (patch) | |
tree | f8ef486c18099477ef4f764a355e9da4770c98b9 | |
parent | 6e3b65b7e02d70d608a4b9bfac08d52a53abf179 (diff) | |
download | lua-language-server-adb221773bbfffcec5e486a8e4f52e44d594508b.zip |
修正一个意外清除value.info的bug
-rw-r--r-- | server/src/vm/value.lua | 9 |
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() |