summaryrefslogtreecommitdiff
path: root/test/diagnostics
diff options
context:
space:
mode:
Diffstat (limited to 'test/diagnostics')
-rw-r--r--test/diagnostics/common.lua39
1 files changed, 39 insertions, 0 deletions
diff --git a/test/diagnostics/common.lua b/test/diagnostics/common.lua
index aff97c77..28a3a32a 100644
--- a/test/diagnostics/common.lua
+++ b/test/diagnostics/common.lua
@@ -2431,3 +2431,42 @@ TEST [[
---@class A
local t = {}
]]
+
+TEST [[
+---@diagnostic disable: unused-local
+
+---@class Foo
+---@field a number
+---@field b number
+---@field c number
+
+---@type Foo|Foo[]
+local a = {
+ {
+ a = 1,
+ b = 2,
+ c = 3,
+ }
+}
+]]
+
+TEST [[
+---@diagnostic disable: unused-local
+
+---@class Foo
+---@field a number
+---@field b number
+---@field c number
+
+---@class Bar
+---@field ba number
+---@field bb number
+---@field bc number
+
+---@type Foo|Bar
+local b = {
+ a = 1,
+ b = 2,
+ c = 3,
+}
+]]