From bc436972d2793e38f71cde5c1b01e9bb317e1c17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 16 Dec 2022 15:30:04 +0800 Subject: fix --- test/type_inference/init.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/type_inference') 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 then +end +]] + TEST 'function' [[ local function x() print() -- cgit v1.2.3