summaryrefslogtreecommitdiff
path: root/server/src/vm/value.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/vm/value.lua')
-rw-r--r--server/src/vm/value.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/src/vm/value.lua b/server/src/vm/value.lua
index 9fd1fdf1..c9e833d6 100644
--- a/server/src/vm/value.lua
+++ b/server/src/vm/value.lua
@@ -124,6 +124,10 @@ end
function mt:setChild(index, value, source)
self:setType('table', 0.5)
+ -- TODO 临时检测
+ if type(index) == 'table' and index.type ~= 'value' then
+ error('child index must be a value', table.dump(index))
+ end
self:rawSet(index, value, source)
return value
end