diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-03-29 13:46:28 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-03-29 13:46:28 +0800 |
commit | cc33507654fa35640118b13bdd3f19696631980a (patch) | |
tree | 636cad7ea765a4439d9655dcf9cba39f3f68e17c /server/src/vm/vm.lua | |
parent | 9c2843279fb04b75169057c3d81a93ce87ebcf34 (diff) | |
download | lua-language-server-cc33507654fa35640118b13bdd3f19696631980a.zip |
尽量不合并value
Diffstat (limited to 'server/src/vm/vm.lua')
-rw-r--r-- | server/src/vm/vm.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/src/vm/vm.lua b/server/src/vm/vm.lua index 3b52e1f0..5d6b024f 100644 --- a/server/src/vm/vm.lua +++ b/server/src/vm/vm.lua @@ -941,6 +941,7 @@ function mt:doLocalFunction(action) local func = self:buildFunction(action) func:addInfo('local', name) loc:setValue(func) + name:bindValue(func, 'local') end end end @@ -1098,13 +1099,13 @@ function mt:createLocal(key, source, value) end if not value then - value = valueMgr.create('nil', self:getDefaultSource()) + value = self:createValue('nil', source) end loc = localMgr.create(key, source, value) self:saveLocal(key, loc) self:bindLocal(source, loc, 'local') - value:addInfo('local', source or self:getDefaultSource()) + value:addInfo('local', source) return loc end |