summaryrefslogtreecommitdiff
path: root/test/diagnostics
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-26 19:54:40 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-26 19:54:40 +0800
commit9dbd786126595a058c2e2afd81047abb7e301715 (patch)
tree9838135af0ff1e6e94213ed7e89bdfa29e5ae3ce /test/diagnostics
parent2896a055dc7e8b8e1cf711a98b12ac633328d974 (diff)
downloadlua-language-server-9dbd786126595a058c2e2afd81047abb7e301715.zip
fix `unused-function`
cannot handle recursion correctly
Diffstat (limited to 'test/diagnostics')
-rw-r--r--test/diagnostics/common.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/diagnostics/common.lua b/test/diagnostics/common.lua
index 53c7b975..5e0d6579 100644
--- a/test/diagnostics/common.lua
+++ b/test/diagnostics/common.lua
@@ -1529,3 +1529,16 @@ local z = x and y
print(z.y)
]]
+
+TEST [[
+local x, y
+function x()
+ y()
+end
+
+function y()
+ x()
+end
+
+x()
+]]