From 342ff9af837cdbe0369e717585fcd36638d60002 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, 1 Jul 2022 16:59:35 +0800 Subject: fix #1257 don't need to return if returns nil --- test/diagnostics/common.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/diagnostics/common.lua b/test/diagnostics/common.lua index 86acbe0c..9ee572cb 100644 --- a/test/diagnostics/common.lua +++ b/test/diagnostics/common.lua @@ -1839,7 +1839,7 @@ end TEST [[ ---@return any, any function F() - X = 1 + X = 1 end ]] @@ -1894,4 +1894,11 @@ function F() end ]] +TEST [[ +---@return number? +function F() + +end +]] + util.arrayRemove(disables, 'redundant-return') -- cgit v1.2.3