summaryrefslogtreecommitdiff
path: root/test/type_inference
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-12-15 20:23:26 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-12-15 20:23:26 +0800
commita744e3439e165be13f8f0ba5262b8f1efec0d86d (patch)
treea2a00988add4df42e67b9f2169c6ee2317bb0058 /test/type_inference
parent244a19d365d8b3d3881492e08fefa9847bd11a2f (diff)
downloadlua-language-server-a744e3439e165be13f8f0ba5262b8f1efec0d86d.zip
stash
Diffstat (limited to 'test/type_inference')
-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 eb2d2e5c..8ae65e48 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -1871,6 +1871,15 @@ if xxx and x then
end
]]
+TEST 'unknown' [[
+---@type integer?
+local x
+
+if not x and x then
+ print(<?x?>)
+end
+]]
+
TEST 'integer' [[
---@type integer?
local x