summaryrefslogtreecommitdiff
path: root/server/test
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-17 12:29:12 +0800
committersumneko <sumneko@hotmail.com>2019-04-17 12:29:12 +0800
commitf2a68c5f7dda67483599dc7c983a2ad3098da097 (patch)
tree4770c53981e71555aa60f7e30c4a4f6f8db0e456 /server/test
parent4ddf788965b6f43d75d119600ed490e47825dff1 (diff)
downloadlua-language-server-f2a68c5f7dda67483599dc7c983a2ad3098da097.zip
修正函数递归时,局部变量堆栈共享状态的bug
Diffstat (limited to 'server/test')
-rw-r--r--server/test/diagnostics/init.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/server/test/diagnostics/init.lua b/server/test/diagnostics/init.lua
index 9fbe9624..218f0f55 100644
--- a/server/test/diagnostics/init.lua
+++ b/server/test/diagnostics/init.lua
@@ -312,3 +312,15 @@ local _ = 1, <!2!>
TEST [[
_ = 1, <!2!>
]]
+
+TEST [[
+local function x()
+ do
+ local k
+ print(k)
+ x()
+ end
+ local k = 1
+ print(k)
+end
+]]