diff options
-rw-r--r-- | script/vm/type.lua | 3 | ||||
-rw-r--r-- | test/diagnostics/type-check.lua | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/script/vm/type.lua b/script/vm/type.lua index d3182eaa..c2871233 100644 --- a/script/vm/type.lua +++ b/script/vm/type.lua @@ -32,6 +32,9 @@ local function getNodeName(object) if object.type == 'doc.type.array' then return 'table' end + if object.type == 'doc.type.string' then + return 'string' + end return nil end diff --git a/test/diagnostics/type-check.lua b/test/diagnostics/type-check.lua index 295fb32d..56d034b6 100644 --- a/test/diagnostics/type-check.lua +++ b/test/diagnostics/type-check.lua @@ -254,5 +254,11 @@ local t = { } ]] +TEST [[ +---@type boolean[] +local t = {} + +t[5] = nil +]] config.remove(nil, 'Lua.diagnostics.disable', 'unused-local') config.remove(nil, 'Lua.diagnostics.disable', 'undefined-global') |