summaryrefslogtreecommitdiff
path: root/test/diagnostics
diff options
context:
space:
mode:
authoralwo <albrecht.woess@signum.plus>2023-03-22 15:36:11 +0100
committeralwo <albrecht.woess@signum.plus>2023-03-22 15:36:11 +0100
commit5f4f8569268f3230db339f8de3bf4b560e9f426e (patch)
tree29026129d4617fe3d9b51bee17ffd5b92555b4e1 /test/diagnostics
parent98f9f15508f37ca73aa92e8f8943af8a4706df18 (diff)
parent91ae26be49374dee87d09f0fe9160cb393e4fef7 (diff)
downloadlua-language-server-5f4f8569268f3230db339f8de3bf4b560e9f426e.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'test/diagnostics')
-rw-r--r--test/diagnostics/type-check.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/diagnostics/type-check.lua b/test/diagnostics/type-check.lua
index 4abe5855..18e7190d 100644
--- a/test/diagnostics/type-check.lua
+++ b/test/diagnostics/type-check.lua
@@ -1238,6 +1238,23 @@ local arr2 = {
}
]]
+TEST [[
+---@class A
+
+---@class B : A
+
+---@class C : B
+
+---@class D : B
+
+---@param x A
+local function func(x) end
+
+---@type C|D
+local var
+func(var)
+]]
+
config.remove(nil, 'Lua.diagnostics.disable', 'unused-local')
config.remove(nil, 'Lua.diagnostics.disable', 'unused-function')
config.remove(nil, 'Lua.diagnostics.disable', 'undefined-global')