summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-01 16:59:35 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-01 16:59:35 +0800
commit342ff9af837cdbe0369e717585fcd36638d60002 (patch)
tree54b7b30a8b24e43e53666e3f754ea4e50d3a69ab /test
parent662532d837d88ec470206b24a1e73cef871f66b6 (diff)
downloadlua-language-server-342ff9af837cdbe0369e717585fcd36638d60002.zip
fix #1257 don't need to return if returns nil
Diffstat (limited to 'test')
-rw-r--r--test/diagnostics/common.lua9
1 files changed, 8 insertions, 1 deletions
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')