summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/diagnostics/type-check.lua11
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')