diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/diagnostics/type-check.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/diagnostics/type-check.lua b/test/diagnostics/type-check.lua index 568e8985..4abe5855 100644 --- a/test/diagnostics/type-check.lua +++ b/test/diagnostics/type-check.lua @@ -1224,6 +1224,20 @@ Class.staticCreator(<!true!>) Class<!:!>staticCreator() -- Expecting a waring ]] +TESTWITH 'assign-type-mismatch' [[ +---@type string[] +local arr = { + <!3!>, +} +]] + +TESTWITH 'assign-type-mismatch' [[ +---@type (string|boolean)[] +local arr2 = { + <!3!>, -- no warnings +} +]] + config.remove(nil, 'Lua.diagnostics.disable', 'unused-local') config.remove(nil, 'Lua.diagnostics.disable', 'unused-function') config.remove(nil, 'Lua.diagnostics.disable', 'undefined-global') |