summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-09-20 14:43:34 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-09-20 14:43:34 +0800
commita641c2658120f1091846085686b4a95b96ce4f04 (patch)
tree75a81e960255c0bf78247e8379b9e0406152ca2b
parenta1af5107dd53388d86902c13ae2e0125ebcbc158 (diff)
downloadlua-language-server-a641c2658120f1091846085686b4a95b96ce4f04.zip
add `__close` to `setmetatable`
fix #2335
-rw-r--r--changelog.md2
-rw-r--r--meta/template/basic.lua3
2 files changed, 5 insertions, 0 deletions
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