diff options
-rw-r--r-- | server/src/vm/vm.lua | 2 | ||||
-rw-r--r-- | server/test/references/init.lua | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/server/src/vm/vm.lua b/server/src/vm/vm.lua index f78f2690..ad25235c 100644 --- a/server/src/vm/vm.lua +++ b/server/src/vm/vm.lua @@ -54,10 +54,12 @@ function mt:buildTable(source) key:bindValue(value, 'set') if key.index then local index = self:getIndex(key) + key:set('parent', tbl) tbl:addInfo('set child', key, index) tbl:setChild(index, value) else if key.type == 'name' then + key:set('parent', tbl) key:set('table index', true) tbl:addInfo('set child', key, key[1]) tbl:setChild(key[1], value) diff --git a/server/test/references/init.lua b/server/test/references/init.lua index 2699fb70..59026031 100644 --- a/server/test/references/init.lua +++ b/server/test/references/init.lua @@ -71,3 +71,10 @@ local a = 1 local <!a!> = 1 <?a?> = <?a?> ]] + +TEST [[ +local t = { + <?a?> = 1 +} +print(t.<!a!>) +]] |