summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-01 17:49:38 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-01 17:49:38 +0800
commit6fc0ad3dae4509c1023b4c2dc3a142c0d69604d8 (patch)
tree73da3688fe2fb86c19037ff6bc2f6bc0f006ae10 /test
parentab1838ebaab773d37b8e16d3fed0c2c1476aea31 (diff)
downloadlua-language-server-6fc0ad3dae4509c1023b4c2dc3a142c0d69604d8.zip
stash
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 0c9be21e..37cf0324 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -3270,3 +3270,14 @@ local b
local <?c?> = a or b
]]
+
+TEST 'number|table|nil' [[
+---@type table|nil
+local a
+
+---@type number|nil
+local b
+
+local c = a and b
+local <?d?> = a or b
+]]