summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-22 17:51:15 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-22 17:51:15 +0800
commit05a098f7ed731b2a3a6d068d5e9d7dfeacc67be0 (patch)
tree7f14a20db22167613559ea154f90fdc9d6cdf042 /test
parent65706920bff73e2d50048b977da65e7ede06f6f8 (diff)
downloadlua-language-server-05a098f7ed731b2a3a6d068d5e9d7dfeacc67be0.zip
fix #1363 don't lookup globals in blocks
Diffstat (limited to 'test')
-rw-r--r--test/diagnostics/common.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/diagnostics/common.lua b/test/diagnostics/common.lua
index 34164a9a..05656db5 100644
--- a/test/diagnostics/common.lua
+++ b/test/diagnostics/common.lua
@@ -1988,6 +1988,28 @@ end
]]
TEST [[
+while true do
+end
+
+<!print(1)!>
+]]
+
+TEST [[
+while true do
+end
+
+<!print(1)!>
+]]
+
+TEST [[
+while X do
+ X = 1
+end
+
+print(1)
+]]
+
+TEST [[
---@diagnostic disable: undefined-global
while true do