summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-12-16 15:14:13 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-12-16 15:14:13 +0800
commitef7d4030ff86eedd0e667b3e7fe4b06ca4aec5fe (patch)
treeebd88956154a1df96073e2ee98e56968c345be82 /test
parent7155b72aea44f631141ab84748e6052cb9da0838 (diff)
downloadlua-language-server-ef7d4030ff86eedd0e667b3e7fe4b06ca4aec5fe.zip
fix
Diffstat (limited to 'test')
-rw-r--r--test/type_inference/init.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 85cbf683..e89133c2 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -4080,3 +4080,16 @@ local function x()
print(<?x?>)
end
]]
+
+TEST 'number' [[
+---@type number?
+local x
+
+do
+ if not x then
+ return
+ end
+end
+
+print(<?x?>)
+]]