summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-24 04:15:34 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-24 04:15:34 +0800
commite76e59948ff86f37a7b17fa79ca7041a1dae1bf8 (patch)
tree72aeb15799df78097d2ef8c6b031ed1c1b5cc067 /test
parentad626d2cfdc9b64c4d2d86dc5e0d352c37788eef (diff)
downloadlua-language-server-e76e59948ff86f37a7b17fa79ca7041a1dae1bf8.zip
infer by `if not x or x then`
Diffstat (limited to 'test')
-rw-r--r--test/type_inference/init.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 052348e2..41ec3df7 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -1957,3 +1957,11 @@ local x
if x and <?x?> then
end
]]
+
+TEST 'integer' [[
+---@type integer?
+local x
+
+if not x or <?x?> then
+end
+]]