summaryrefslogtreecommitdiff
path: root/test/type_inference
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-02-10 16:01:17 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-02-10 16:01:17 +0800
commit4b0d634a27ae188c98f839736bad1b8514952467 (patch)
tree1152d131fe33306b0b753ed20d799119829add53 /test/type_inference
parent5e112de9cbf4627038036fdfa41e9cf890d74e1d (diff)
downloadlua-language-server-4b0d634a27ae188c98f839736bad1b8514952467.zip
fix #1889
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 5a9e1796..4e3c9d5b 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -2620,6 +2620,17 @@ end
print(<?n?>)
]]
+TEST 'integer' [[
+---@type integer?
+local n
+
+if not n then
+ os.exit()
+end
+
+print(<?n?>)
+]]
+
TEST 'table' [[
---@type table?
local n