summaryrefslogtreecommitdiff
path: root/test/type_inference
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-04 20:29:47 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-04 20:29:47 +0800
commit3e18b81da356588b9e9749092d9833ca85e88e26 (patch)
treef6a1ee5e2ca063e0918c3994c2ab573eea4618f9 /test/type_inference
parent6f52414fc098886056d8060dde097626e5095126 (diff)
downloadlua-language-server-3e18b81da356588b9e9749092d9833ca85e88e26.zip
fix
Diffstat (limited to 'test/type_inference')
-rw-r--r--test/type_inference/init.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 50b3901d..02e9364e 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -3219,6 +3219,16 @@ local n
print(<?n?>)
]]
+TEST 'table' [[
+---@type number|table
+local n
+
+if n
+---@cast n table
+and <?n?>.type == 'xxx' then
+end
+]]
+
TEST 'integer' [[
---@type integer?
local n