summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-02-03 14:39:50 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-02-03 14:39:50 +0800
commit5a0c221ec5ec4d84889c1b8fc0581b5da5f172b2 (patch)
treeaa61825533a43138428bf94610bfb67d4e8434ff /script
parent12777ffab279fc723a9748b14a3c38efad8b63ba (diff)
downloadlua-language-server-5a0c221ec5ec4d84889c1b8fc0581b5da5f172b2.zip
GC don't warn dummy function
Diffstat (limited to 'script')
-rw-r--r--script/gc.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/script/gc.lua b/script/gc.lua
index 7bb81569..ff22195e 100644
--- a/script/gc.lua
+++ b/script/gc.lua
@@ -27,7 +27,9 @@ local function isRemoved(obj)
for i = 1, 1000 do
local n, v = debug.getupvalue(obj, i)
if not n then
- log.warn('函数式析构器没有 removed 上值!', util.dump(debug.getinfo(obj)))
+ if i > 1 then
+ log.warn('函数式析构器没有 removed 上值!', util.dump(debug.getinfo(obj)))
+ end
break
end
if n == 'removed' then