summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-25 14:35:51 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-25 14:35:51 +0800
commitae42fbc3b3470b03aa2e86934883acf807a037c4 (patch)
tree718e74b7190fa3a5d2f654ee5b3d281305e220ac
parent6e8e0737f5643114ee1bfc5edcb2aeef435ed436 (diff)
downloadlua-language-server-ae42fbc3b3470b03aa2e86934883acf807a037c4.zip
add test
-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 617d34db..60a88577 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -2235,3 +2235,14 @@ end
print(<?x?>)
]]
+
+TEST 'true' [[
+---@type boolean | nil
+local x
+
+if not x then
+ return
+end
+
+print(<?x?>)
+]]