From 1110e83bb47345a487aa78cc343ef501b86f7d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 27 May 2021 17:39:27 +0800 Subject: update --- test/hover/init.lua | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/hover/init.lua b/test/hover/init.lua index 7778b6b5..63e2217b 100644 --- a/test/hover/init.lua +++ b/test/hover/init.lua @@ -1068,6 +1068,8 @@ function f(x: number, y: boolean) ]] TEST [[ +---@class Class + ---@vararg Class local function f(...) local _, = ... @@ -1079,6 +1081,21 @@ local x: Class ]] TEST [[ +---@class Class + +---@vararg Class +local function f(...) + local t = {...} + local = t[1] +end +]] +[[ +local v: Class +]] + +TEST [[ +---@class Class + ---@vararg Class local function f(...) local = {...} @@ -1154,23 +1171,29 @@ local x: table ]] --TEST [[ +-----@class ClassA +-----@class ClassB +-- -----@type table --local t --for _, in pairs(t) do --end --]] --[[ ---local x: *ClassB +--local x: ClassB --]] --TEST [[ +-----@class ClassA +-----@class ClassB +-- -----@type table --local t --for , v in pairs(t) do --end --]] --[[ ---local k: *ClassA +--local k: ClassA --]] TEST [[ -- cgit v1.2.3