summaryrefslogtreecommitdiff
path: root/test/type_inference
diff options
context:
space:
mode:
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?>)