summaryrefslogtreecommitdiff
path: root/test/type_inference
diff options
context:
space:
mode:
Diffstat (limited to 'test/type_inference')
-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 cabff606..eb2d2e5c 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -1829,6 +1829,17 @@ end
print(<?x?>)
]]
+TEST 'nil' [[
+---@type integer?
+local x
+
+if not x then
+ print(<?x?>)
+end
+
+print(x)
+]]
+
TEST 'integer' [[
---@type integer?
local x