From aa0fbf5aede66b2c3f380d44f2a031d19fd2d975 Mon Sep 17 00:00:00 2001 From: NeOzay Date: Mon, 8 Jul 2024 16:34:32 +0200 Subject: fix: add a missing check for inject-field diagnostics --- test/diagnostics/inject-field.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/diagnostics') diff --git a/test/diagnostics/inject-field.lua b/test/diagnostics/inject-field.lua index 9bb0f8fc..d5b49701 100644 --- a/test/diagnostics/inject-field.lua +++ b/test/diagnostics/inject-field.lua @@ -82,3 +82,16 @@ function m:init() -- OK end end ]] + +TEST [[ +---@class Class +local m = { + xx = 1, -- OK +} + +---@type Class +local m + +m.xx = 1 -- OK +m. = 1 -- Warning +]] -- cgit v1.2.3