summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-27 00:06:48 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-27 00:06:48 +0800
commitc50a20ddad4adb3e0f8ead37a2e6a9960fe3000d (patch)
treebbb1a4f02ae6e2f659dfc48c7339d7bb01de18b1 /test
parent031dc060e3cf2096e9171e168f15346e7d481f41 (diff)
downloadlua-language-server-c50a20ddad4adb3e0f8ead37a2e6a9960fe3000d.zip
fix #1235 don't drop node in `for`/`while`...
Diffstat (limited to 'test')
-rw-r--r--test/type_inference/init.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index db5a38fd..7b4185d7 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -3126,3 +3126,19 @@ local f
local _, <?n?> = f()
]]
+
+TEST 'string' [[
+local s
+while true do
+ s = ''
+end
+print(<?s?>)
+]]
+
+TEST 'string' [[
+local s
+for _ in _ do
+ s = ''
+end
+print(<?s?>)
+]]