summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
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?>)
+]]