summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-26 16:25:54 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-26 16:25:54 +0800
commit09d31b022f33e5c5e8875117c0a6ea51e37ebcb1 (patch)
tree1e72c7dbda72ed91e2f379d1cb6bead257e7671f /server
parent387c750b96f404a4bf6db5b049d6a45f6eb99b2e (diff)
downloadlua-language-server-09d31b022f33e5c5e8875117c0a6ea51e37ebcb1.zip
清理value绑定的function
Diffstat (limited to 'server')
-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 9665a50f..a51040b4 100644
--- a/server/src/vm/value.lua
+++ b/server/src/vm/value.lua
@@ -384,6 +384,10 @@ function mt:setFunction(func)
end
function mt:getFunction()
+ local func = self._func
+ if not func:getSource() then
+ self._func = nil
+ end
return self._func
end