diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-27 00:42:31 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-27 00:42:31 +0800 |
commit | 92b2a185af2d31dd353ef8a7d57469ee9d584cb7 (patch) | |
tree | 6bf05537370f6aae25e956f927773e95ad229b07 /test/diagnostics | |
parent | c50a20ddad4adb3e0f8ead37a2e6a9960fe3000d (diff) | |
download | lua-language-server-92b2a185af2d31dd353ef8a7d57469ee9d584cb7.zip |
resolve #1236 custom class can extends basic class
Diffstat (limited to 'test/diagnostics')
-rw-r--r-- | test/diagnostics/type-check.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/diagnostics/type-check.lua b/test/diagnostics/type-check.lua index 711211e8..34f7a492 100644 --- a/test/diagnostics/type-check.lua +++ b/test/diagnostics/type-check.lua @@ -479,5 +479,22 @@ n = nb ]] config.set(nil, 'Lua.type.weakUnionCheck', false) +TEST [[ +---@class Option: string + +---@param x Option +local function f(x) end + +---@type Option +local x = 'aaa' + +f(x) +]] + +TEST [[ +---@type number +local <!x!> = 'aaa' +]] + config.remove(nil, 'Lua.diagnostics.disable', 'unused-local') config.remove(nil, 'Lua.diagnostics.disable', 'undefined-global') |