diff options
Diffstat (limited to 'test/diagnostics')
-rw-r--r-- | test/diagnostics/missing-fields.lua | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/diagnostics/missing-fields.lua b/test/diagnostics/missing-fields.lua index f5fdd35c..ab87f81d 100644 --- a/test/diagnostics/missing-fields.lua +++ b/test/diagnostics/missing-fields.lua @@ -205,3 +205,29 @@ TEST [[ ---@type A return <!{}!> ]] + +TEST [[ +---@class A +---@field x number + +---@class B +---@field y number + +---@type A|B +local t = <!{ + z = 1, +}!> +]] + +TEST [[ +---@class A +---@field x number + +---@class B +---@field y number + +---@type A|B +local t = { + y = 1, +} +]] |