diff options
author | CppCXY <812125110@qq.com> | 2024-02-22 20:29:13 +0800 |
---|---|---|
committer | CppCXY <812125110@qq.com> | 2024-02-22 20:29:13 +0800 |
commit | 9b6df71d97a70ee7179949ef9f15368cbf29dcbd (patch) | |
tree | bf7a7e62ed7c164a12bdce437c17262a5235bcec /test/diagnostics/redundant-return-value.lua | |
parent | 483fe246b6ae8c25d433aa15e43f04f0e71a74d5 (diff) | |
parent | 3e6fd3ce1f2f0528336ded939d776a29bbfaf2eb (diff) | |
download | lua-language-server-9b6df71d97a70ee7179949ef9f15368cbf29dcbd.zip |
Merge branch 'master' of github.com:CppCXY/lua-language-server
Diffstat (limited to 'test/diagnostics/redundant-return-value.lua')
-rw-r--r-- | test/diagnostics/redundant-return-value.lua | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/diagnostics/redundant-return-value.lua b/test/diagnostics/redundant-return-value.lua new file mode 100644 index 00000000..f3e2c584 --- /dev/null +++ b/test/diagnostics/redundant-return-value.lua @@ -0,0 +1,32 @@ +TEST [[ +---@type fun():number +local function f() + return 1, <!true!> +end +]] + +TEST [[ +---@return number, number? +function F() + return 1, 1, <!1!> +end +]] + +TEST [[ +---@return number, number? +function F() + return 1, 1, <!1!>, <!2!>, <!3!> +end +]] + +TEST [[ +---@meta + +---@return number, number +local function r2() end + +---@return number, number? +function F() + return 1, <!r2()!> +end +]] |