summaryrefslogtreecommitdiff
path: root/test/diagnostics
diff options
context:
space:
mode:
authorNeOzay <colpaert.benoit@gmail.com>2024-07-08 16:34:32 +0200
committerNeOzay <colpaert.benoit@gmail.com>2024-07-08 16:34:32 +0200
commitaa0fbf5aede66b2c3f380d44f2a031d19fd2d975 (patch)
tree20d55493564019f0ddad878ca1ba96e465c0f7b3 /test/diagnostics
parent46707395df3255808682fdac883f7d86c1ac9a78 (diff)
downloadlua-language-server-aa0fbf5aede66b2c3f380d44f2a031d19fd2d975.zip
fix: add a missing check for inject-field diagnostics
Diffstat (limited to 'test/diagnostics')
-rw-r--r--test/diagnostics/inject-field.lua13
1 files changed, 13 insertions, 0 deletions
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.<!yy!> = 1 -- Warning
+]]