summaryrefslogtreecommitdiff
path: root/server/src/matcher/vm.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/matcher/vm.lua')
-rw-r--r--server/src/matcher/vm.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/server/src/matcher/vm.lua b/server/src/matcher/vm.lua
index 36634710..0700f640 100644
--- a/server/src/matcher/vm.lua
+++ b/server/src/matcher/vm.lua
@@ -486,13 +486,16 @@ function mt:inference(value, type)
end
end
-function mt:createValue(type, source, v)
+function mt:createValue(tp, source, v)
+ if type(tp) == 'table' then
+ tp = tp[1]
+ end
local value = {
- type = type,
+ type = tp,
source = source or DefaultSource,
value = v,
}
- local lib = library.object[type]
+ local lib = library.object[tp]
if lib then
self:getLibChild(value, lib, 'object')
end