summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-14 16:29:15 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-14 16:29:15 +0800
commit0d79784ccf47a03f9f35e1afbd579ecbab0acd5a (patch)
tree78871a7af5860a7d35b167847e8c3b401c352720 /test
parentcb8bcd478129c490a2635d0b938de1e2d7c774d2 (diff)
downloadlua-language-server-0d79784ccf47a03f9f35e1afbd579ecbab0acd5a.zip
fix
Diffstat (limited to 'test')
-rw-r--r--test/diagnostics/common.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/diagnostics/common.lua b/test/diagnostics/common.lua
index 1ab6ec5c..4c065ac6 100644
--- a/test/diagnostics/common.lua
+++ b/test/diagnostics/common.lua
@@ -1986,3 +1986,17 @@ function X()
<!return true!>
end
]]
+
+TEST [[
+---@diagnostic disable: undefined-global
+
+while true do
+ if not X then
+ break
+ end
+end
+
+print(1)
+
+do return end
+]]