From 91869bc5f447dc07ecc78695852e719c67af9b85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 9 Aug 2023 16:30:21 +0800 Subject: fix wrong hover and signature for method with varargs and overloads --- test/crossfile/hover.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'test/crossfile') diff --git a/test/crossfile/hover.lua b/test/crossfile/hover.lua index aee9ea0a..617b6f7e 100644 --- a/test/crossfile/hover.lua +++ b/test/crossfile/hover.lua @@ -1695,6 +1695,26 @@ function f(x: number, y: number) ```]] } +TEST { { path = 'a.lua', content = [[ +---@overload fun(self: self, x: number) +---@overload fun(self: self, x: number, y: number) +function M:f(...) +end + +M: +]] }, +hover = [[ +```lua +(method) M:f(x: number) +``` + +--- + +```lua +(method) M:f(x: number, y: number) +```]] +} + TEST { {path = 'a.lua', content = [[ ---@class A -- cgit v1.2.3