diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-07-18 23:07:41 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-07-18 23:07:41 +0800 |
commit | a92a8003600dc2a0dc867c31bd817320cf6f7c56 (patch) | |
tree | dce16f39f9fabb3c7aa59a20c975098a09eede82 /test | |
parent | 38ad313a97e4c191dfefe5831ffb373242f36fa2 (diff) | |
download | lua-language-server-a92a8003600dc2a0dc867c31bd817320cf6f7c56.zip |
fix #1346
Diffstat (limited to 'test')
-rw-r--r-- | test/diagnostics/type-check.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/diagnostics/type-check.lua b/test/diagnostics/type-check.lua index b99e226c..c3bc3301 100644 --- a/test/diagnostics/type-check.lua +++ b/test/diagnostics/type-check.lua @@ -1,6 +1,7 @@ local config = require 'config' config.add(nil, 'Lua.diagnostics.disable', 'unused-local') +config.add(nil, 'Lua.diagnostics.disable', 'unused-function') config.add(nil, 'Lua.diagnostics.disable', 'undefined-global') TEST [[ @@ -727,6 +728,15 @@ TEST [[ ---@type number local x = G ]] + +TEST [[ +---@generic T +---@param x T +---@return T +local function f(x) + return x +end +]] config.set(nil, 'Lua.type.weakUnionCheck', false) TEST [[ @@ -765,4 +775,5 @@ f(<!3!>) ]] config.remove(nil, 'Lua.diagnostics.disable', 'unused-local') +config.remove(nil, 'Lua.diagnostics.disable', 'unused-function') config.remove(nil, 'Lua.diagnostics.disable', 'undefined-global') |