summaryrefslogtreecommitdiff
path: root/test/type_inference
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-12-13 21:00:38 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-12-13 21:00:38 +0800
commiteb05f7ac0f85d034c20e29f68b12d84fa7436601 (patch)
tree1f93744bf103c861bfe2252f3b7d2eb37ef741d7 /test/type_inference
parented97a9e8905fdbb3b23694896c813cfdb73cd91f (diff)
downloadlua-language-server-eb05f7ac0f85d034c20e29f68b12d84fa7436601.zip
stash
Diffstat (limited to 'test/type_inference')
-rw-r--r--test/type_inference/init.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index cabff606..eb2d2e5c 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -1829,6 +1829,17 @@ end
print(<?x?>)
]]
+TEST 'nil' [[
+---@type integer?
+local x
+
+if not x then
+ print(<?x?>)
+end
+
+print(x)
+]]
+
TEST 'integer' [[
---@type integer?
local x