summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-01-30 18:02:53 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-01-30 18:02:53 +0800
commitb4e36a946a42a35d49290e095ff044f2ffa051e9 (patch)
tree536b6853d0091456e371666c679dd6560ab7e761 /server/src
parent170d7a2894ca9cb758edc9f75343889552d07e0c (diff)
downloadlua-language-server-b4e36a946a42a35d49290e095ff044f2ffa051e9.zip
调用函数时要截断调用处的局部变量
Diffstat (limited to 'server/src')
-rw-r--r--server/src/core/vm.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/server/src/core/vm.lua b/server/src/core/vm.lua
index e649ecc7..8359c470 100644
--- a/server/src/core/vm.lua
+++ b/server/src/core/vm.lua
@@ -288,6 +288,7 @@ function mt:runFunction(func)
self.chunk:cut 'locals'
self.chunk.func = func
+ self.scope:cut 'locals'
for name, loc in pairs(func.upvalues) do
self.scope.locals[name] = loc
end