summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-18 01:03:25 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-18 01:03:25 +0800
commit6df9d8376bc5339a8c4218cc261dc76d7ac8e7ad (patch)
treea6e13efaf733f6b3ef618ece150aa1fb3579f456 /test
parent7b35e39b5eae7c3445cd9ec4d16637185bc26b93 (diff)
downloadlua-language-server-6df9d8376bc5339a8c4218cc261dc76d7ac8e7ad.zip
update
Diffstat (limited to 'test')
-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