From 619303cbf0fed55ed6c8baec6e3b9d873f68207b Mon Sep 17 00:00:00 2001 From: sumneko Date: Wed, 3 Apr 2019 20:52:00 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=9F=90=E4=BA=9B=E6=9C=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E5=85=A8=E5=B1=80=E5=8F=98=E9=87=8F=E8=A2=AB=E8=AF=8A?= =?UTF-8?q?=E6=96=AD=E4=B8=BA=E9=87=8D=E8=BD=BD=5FENV=E5=90=8E=E6=9C=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/core/diagnostics.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'server/src/core') diff --git a/server/src/core/diagnostics.lua b/server/src/core/diagnostics.lua index c38d563b..a0cbb23d 100644 --- a/server/src/core/diagnostics.lua +++ b/server/src/core/diagnostics.lua @@ -64,7 +64,7 @@ function mt:searchUndefinedGlobal(callback) if not parent then return end - if not parent:get 'ENV' then + if not parent:get 'ENV' and not source:get 'in index' then return end if definedGlobal[name] then @@ -301,6 +301,9 @@ function mt:searchUndefinedEnvChild(callback) if name == '' then return end + if source:get 'in index' then + return + end local parent = source:get 'parent' if parent:get 'ENV' then return -- cgit v1.2.3