summaryrefslogtreecommitdiff
path: root/server/src/vm/multi.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-04 16:48:58 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-04 16:48:58 +0800
commit4843133cf08b1a05c506665b5b84bdf6ccbea884 (patch)
tree60c58b8e82b780600ae3801c954bd04794fd00f9 /server/src/vm/multi.lua
parentd165bf61b7f9d004cc670f6d5316096406054d2d (diff)
downloadlua-language-server-4843133cf08b1a05c506665b5b84bdf6ccbea884.zip
类型推断
Diffstat (limited to 'server/src/vm/multi.lua')
-rw-r--r--server/src/vm/multi.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/server/src/vm/multi.lua b/server/src/vm/multi.lua
index 93900a36..f4f21b86 100644
--- a/server/src/vm/multi.lua
+++ b/server/src/vm/multi.lua
@@ -64,6 +64,12 @@ function mt:eachValue(callback)
end
end
+function mt:merge(other)
+ other:eachValue(function (_, value)
+ self:push(value)
+ end)
+end
+
return function ()
local self = setmetatable({}, mt)
return self