summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-28 16:18:09 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-28 16:18:09 +0800
commit7de3d6851a41d993b1f84eddd3331067a82e8878 (patch)
tree5c369a01fb2c21397a15b82263ec624e04fb38b1 /test
parent75b8b11130cb3baae68082eaa49ecef9a8570e3a (diff)
downloadlua-language-server-7de3d6851a41d993b1f84eddd3331067a82e8878.zip
fix infer in table
Diffstat (limited to 'test')
-rw-r--r--test/type_inference/init.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 6d81e640..a8ea4cf3 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -3175,3 +3175,12 @@ print(<?f?>)
function f() end
]]
+
+TEST 'number' [[
+---@type number|nil
+local n
+
+local t = {
+ x = n and <?n?>,
+}
+]]