From b1e0cdbeb13656f1fcd6cb2d45b8095e5b511457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 7 Nov 2022 14:24:41 +0800 Subject: fix again --- test/diagnostics/type-check.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/diagnostics/type-check.lua') diff --git a/test/diagnostics/type-check.lua b/test/diagnostics/type-check.lua index ff75f3cc..81cb1050 100644 --- a/test/diagnostics/type-check.lua +++ b/test/diagnostics/type-check.lua @@ -961,6 +961,14 @@ TEST [[ local t = { true, false, nil } ]] +TEST [[ +---@type boolean|nil +local x + +---@type boolean[] +local t = { true, false, x } +]] + config.remove(nil, 'Lua.diagnostics.disable', 'unused-local') config.remove(nil, 'Lua.diagnostics.disable', 'unused-function') config.remove(nil, 'Lua.diagnostics.disable', 'undefined-global') -- cgit v1.2.3