From a641c2658120f1091846085686b4a95b96ce4f04 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, 20 Sep 2023 14:43:34 +0800 Subject: add `__close` to `setmetatable` fix #2335 --- changelog.md | 2 ++ meta/template/basic.lua | 3 +++ 2 files changed, 5 insertions(+) diff --git a/changelog.md b/changelog.md index e3680354..3053ab25 100644 --- a/changelog.md +++ b/changelog.md @@ -2,8 +2,10 @@ ## 3.7.1 * `FIX` [#2299] +* `FIX` [#2335] [#2299]: https://github.com/LuaLS/lua-language-server/issues/2299 +[#2335]: https://github.com/LuaLS/lua-language-server/issues/2335 ## 3.7.0 `2023-8-24` diff --git a/meta/template/basic.lua b/meta/template/basic.lua index 44f62a46..4a9360fd 100644 --- a/meta/template/basic.lua +++ b/meta/template/basic.lua @@ -251,6 +251,9 @@ function setfenv(f, table) end ---#if VERSION == JIT or VERSION == 5.2 then ---@field __ipairs (fun(t):(fun(t,k,v):(integer|nil),any))|nil ---#end +---#if VERSION >= 5.4 then +---@field __close (fun(t,errobj):any)|nil +---#end ---#DES 'setmetatable' ---@param table table -- cgit v1.2.3