summaryrefslogtreecommitdiff
path: root/test/type_inference
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-12-16 15:30:04 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-12-16 15:30:04 +0800
commitbc436972d2793e38f71cde5c1b01e9bb317e1c17 (patch)
tree538dff32904463775805b43b28a31aad352eae38 /test/type_inference
parentef7d4030ff86eedd0e667b3e7fe4b06ca4aec5fe (diff)
downloadlua-language-server-bc436972d2793e38f71cde5c1b01e9bb317e1c17.zip
fix
Diffstat (limited to 'test/type_inference')
-rw-r--r--test/type_inference/init.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index e89133c2..96393578 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -4075,6 +4075,19 @@ else
end
]]
+TEST 'A|B' [[
+---@class A
+---@class B
+
+---@type A|B
+local t
+
+if x then
+ ---@cast t A
+elseif <?t?> then
+end
+]]
+
TEST 'function' [[
local function x()
print(<?x?>)