summaryrefslogtreecommitdiff
path: root/test/diagnostics/type-check.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/diagnostics/type-check.lua')
-rw-r--r--test/diagnostics/type-check.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/diagnostics/type-check.lua b/test/diagnostics/type-check.lua
index 908920b9..ba0c78b4 100644
--- a/test/diagnostics/type-check.lua
+++ b/test/diagnostics/type-check.lua
@@ -1117,6 +1117,17 @@ local B = "World"
local x = A
]]
+TEST [[
+local enum = { a = 1, b = 2 }
+
+---@type { [integer] : boolean }
+local t = {
+ <![enum.a]!> = 1,
+ <![enum.b]!> = 2,
+ <![3]!> = 3,
+}
+]]
+
config.remove(nil, 'Lua.diagnostics.disable', 'unused-local')
config.remove(nil, 'Lua.diagnostics.disable', 'unused-function')
config.remove(nil, 'Lua.diagnostics.disable', 'undefined-global')