diff options
Diffstat (limited to 'test')
-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 9dda3333..cbf9265c 100644 --- a/test/diagnostics/type-check.lua +++ b/test/diagnostics/type-check.lua @@ -283,5 +283,22 @@ local t = { <!t.x!> = true ]] +TEST [[ +---@type number +local t + +t = 1 +]] + +TEST [[ +---@type number +local t + +---@type integer +local y + +t = y +]] + config.remove(nil, 'Lua.diagnostics.disable', 'unused-local') config.remove(nil, 'Lua.diagnostics.disable', 'undefined-global') |