diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2023-03-08 21:32:39 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2023-03-08 21:32:39 +0800 |
commit | c6820ed9972fe26594c1661d3887fb1d9a6dda1e (patch) | |
tree | 8835a7e2f4c66ae80d33a4ab36e8e76617989a1e /test/diagnostics | |
parent | dcfc5d24708643bc2e41f49f227580716a2103a2 (diff) | |
download | lua-language-server-c6820ed9972fe26594c1661d3887fb1d9a6dda1e.zip |
should check type of `self`
fix #1922
Diffstat (limited to 'test/diagnostics')
-rw-r--r-- | test/diagnostics/type-check.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/diagnostics/type-check.lua b/test/diagnostics/type-check.lua index 198ead64..568e8985 100644 --- a/test/diagnostics/type-check.lua +++ b/test/diagnostics/type-check.lua @@ -1211,6 +1211,19 @@ end get_val('hi') ]] +TESTWITH 'param-type-mismatch' [[ +---@class Class +local Class = {} + +---@param source string +function Class.staticCreator(source) + +end + +Class.staticCreator(<!true!>) +Class<!:!>staticCreator() -- Expecting a waring +]] + config.remove(nil, 'Lua.diagnostics.disable', 'unused-local') config.remove(nil, 'Lua.diagnostics.disable', 'unused-function') config.remove(nil, 'Lua.diagnostics.disable', 'undefined-global') |