summaryrefslogtreecommitdiff
path: root/test/diagnostics
diff options
context:
space:
mode:
Diffstat (limited to 'test/diagnostics')
-rw-r--r--test/diagnostics/common.lua21
1 files changed, 20 insertions, 1 deletions
diff --git a/test/diagnostics/common.lua b/test/diagnostics/common.lua
index 7ca476d7..203bb7b6 100644
--- a/test/diagnostics/common.lua
+++ b/test/diagnostics/common.lua
@@ -1007,7 +1007,7 @@ function mt2:method2() end
local v
---@type Bar
local v2
-v2 = v
+<!v2!> = v
v2:<!method1!>()
v2:method2()
]]
@@ -1761,6 +1761,25 @@ local y
TEST [[
---@diagnostic disable: unused-local
+local y = true
+
+local x
+x = 1
+x = y
+]]
+
+TEST [[
+---@diagnostic disable: unused-local
+
+local t = {}
+
+local x = 0
+x = x + #t
+]]
+
+TEST [[
+---@diagnostic disable: unused-local
+
---@class A
---@field x integer
local t