diff options
Diffstat (limited to 'test/diagnostics/type-check.lua')
-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') |