From 6df9d8376bc5339a8c4218cc261dc76d7ac8e7ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Sat, 18 Jun 2022 01:03:25 +0800 Subject: update --- test/diagnostics/common.lua | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'test') 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 + = v v2:() 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 -- cgit v1.2.3