summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-24 05:25:06 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-24 05:25:06 +0800
commit24abcb32ef427ce9ed8501af2a0a01aca42e23cf (patch)
tree1101364b3bf330ac986520fd340509e75a708877 /test
parentb204411a88f4c36be9e9ce2710f03f2a0295e3a6 (diff)
downloadlua-language-server-24abcb32ef427ce9ed8501af2a0a01aca42e23cf.zip
infer by `goto`
Diffstat (limited to 'test')
-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 df1f538b..fa677fa9 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -1855,6 +1855,17 @@ end
print(<?x?>)
]]
+TEST 'integer' [[
+---@type integer?
+local x
+
+if not x then
+ goto ANYWHERE
+end
+
+print(<?x?>)
+]]
+
TEST 'integer' [=[
local x