diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-23 14:39:42 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-23 14:39:42 +0800 |
commit | 8c56e6ba9d85f3e01fb3658901386ee89de847ab (patch) | |
tree | 1430ef6c8f84e7bd3db3e7f497d69c8de2f1df62 /test/diagnostics | |
parent | 5c0f9c4672b564da6d54ac8649afe199e4d7b1d7 (diff) | |
download | lua-language-server-8c56e6ba9d85f3e01fb3658901386ee89de847ab.zip |
update
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') |