diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-03-15 15:38:23 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-03-15 15:38:23 +0800 |
commit | 212360dd88275317c2aa63252538f9cdae1db3b7 (patch) | |
tree | 587f4feadf8a561fd75c19f8c58e89e11078982e /server/src | |
parent | d23dc0b4ccf172230ac149bd3cc517b196aa14b3 (diff) | |
download | lua-language-server-212360dd88275317c2aa63252538f9cdae1db3b7.zip |
获取局部变量的shadow时过滤死亡对象
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/vm/local.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/server/src/vm/local.lua b/server/src/vm/local.lua index a62e812f..6ddaac03 100644 --- a/server/src/vm/local.lua +++ b/server/src/vm/local.lua @@ -109,6 +109,12 @@ end function mt:shadow(old) if not old then + for i = #self._shadow, 1, -1 do + local loc = self._shadow[i] + if not loc:getSource() then + table.remove(self._shadow, i) + end + end return self._shadow end local group = old._shadow |