diff options
Diffstat (limited to 'test/diagnostics')
-rw-r--r-- | test/diagnostics/type-check.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/diagnostics/type-check.lua b/test/diagnostics/type-check.lua index 6b2c522f..147d6229 100644 --- a/test/diagnostics/type-check.lua +++ b/test/diagnostics/type-check.lua @@ -380,5 +380,21 @@ local t = { } ]] +TEST [[ +---@class A + +---@param n A +local function f(n) +end + +---@class B +local a = {} + +---@type A? +a.x = XX + +f(a.x) +]] + config.remove(nil, 'Lua.diagnostics.disable', 'unused-local') config.remove(nil, 'Lua.diagnostics.disable', 'undefined-global') |