summaryrefslogtreecommitdiff
path: root/server/src/vm/value.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-12 10:33:58 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-12 10:33:58 +0800
commitf3b64a19f9558cada90ccc2f885bf44fef2e1d7e (patch)
tree9c7f88fd1b6b53035126c959857ef6ac3bd4e1b9 /server/src/vm/value.lua
parentc7611a41f655116b1526ead077686e7de6a2d9c6 (diff)
downloadlua-language-server-f3b64a19f9558cada90ccc2f885bf44fef2e1d7e.zip
优化
Diffstat (limited to 'server/src/vm/value.lua')
-rw-r--r--server/src/vm/value.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/vm/value.lua b/server/src/vm/value.lua
index d01712a6..453c0799 100644
--- a/server/src/vm/value.lua
+++ b/server/src/vm/value.lua
@@ -202,6 +202,9 @@ function mt:eachChild(callback, mark, foundIndex)
end
function mt:mergeValue(value)
+ if self == value then
+ return
+ end
if value._type then
for tp, rate in pairs(value._type) do
self:setType(tp, rate)