From a698d13407454735870b671bb270f0cf33daab31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 23 Jan 2019 15:30:15 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=85=A8=E5=B1=80=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E7=9A=84=E4=B8=80=E4=B8=AAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/core/global.lua | 1 - server/src/service.lua | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'server/src') diff --git a/server/src/core/global.lua b/server/src/core/global.lua index 5704bfd4..ba4fdc47 100644 --- a/server/src/core/global.lua +++ b/server/src/core/global.lua @@ -25,7 +25,6 @@ function mt:markGet(uri, k) end function mt:compileVM(uri, vm) - self:clearGlobal(uri) local seted = {} for k, v in next, vm.env.child do local get, set diff --git a/server/src/service.lua b/server/src/service.lua index 57606d19..8e22c724 100644 --- a/server/src/service.lua +++ b/server/src/service.lua @@ -293,6 +293,7 @@ function mt:compileVM(uri) local ast = self:compileAst(obj) obj.astCost = os.clock() - clock self:_clearChainNode(obj, uri) + self._global:clearGlobal(uri) local clock = os.clock() obj.vm = core.vm(ast, self, uri) @@ -336,6 +337,8 @@ function mt:doDiagnostics(uri) uri = uri, diagnostics = res, }) + else + self:clearDiagnostics(uri) end end -- cgit v1.2.3