summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-12-13 16:39:03 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-12-13 16:39:03 +0800
commit73f8157c96d2551d7cfc3e2b1868a792095eec03 (patch)
tree503f161ef19fd6258f7f84f55e91a50b7dd5daaa /test
parent98589ddbeba3cb7e9341e79bb674bad9e8b957c3 (diff)
downloadlua-language-server-73f8157c96d2551d7cfc3e2b1868a792095eec03.zip
special treats for `do`
Diffstat (limited to 'test')
-rw-r--r--test/type_inference/init.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 02b3da03..ab7404e2 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -1758,6 +1758,15 @@ x = '1'
x = 1
]]
+TEST 'integer' [[
+local x
+x = true
+do
+ x = 1
+end
+print(<?x?>)
+]]
+
TEST 'integer?' [[
---@type integer?
local <?x?>