From 94069457d8a91dc6b53850d2a4a52eaf160de955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 8 Mar 2019 15:49:16 +0800 Subject: =?UTF-8?q?=E4=B8=80=E4=BA=9B=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/vm/value.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/src/vm/value.lua b/server/src/vm/value.lua index d47d6c15..b520054c 100644 --- a/server/src/vm/value.lua +++ b/server/src/vm/value.lua @@ -170,6 +170,7 @@ function mt:eachChild(callback, mark, foundIndex) return method:eachChild(callback, mark, foundIndex) end +local hasSource = {} function mt:mergeValue(value) if value._type then for tp, rate in pairs(value._type) do @@ -184,7 +185,6 @@ function mt:mergeValue(value) self._child[k] = v end end - local hasSource = {} for _, info in ipairs(self) do hasSource[info.source] = true end @@ -193,6 +193,9 @@ function mt:mergeValue(value) self[#self+1] = info end end + for k in pairs(hasSource) do + hasSource[k] = nil + end if value._meta then self._meta = value._meta end -- cgit v1.2.3