From fc4e8ef687ad996f96091c664c6a9110dd087a5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Sun, 26 Jun 2022 01:42:35 +0800 Subject: #1207 split `...(param)` and `...(return)` displayed in enums of hover --- test/crossfile/hover.lua | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'test') diff --git a/test/crossfile/hover.lua b/test/crossfile/hover.lua index c6991d8f..827c440c 100644 --- a/test/crossfile/hover.lua +++ b/test/crossfile/hover.lua @@ -1181,3 +1181,42 @@ function f(x: number, y: number, ...: number) 3. ...number ```]] } + +TEST { + { + path = 'a.lua', + content = [[ + ---@param p 'a1' | 'a2' + ---@param ... 'a3' | 'a4' + ---@return 'r1' | 'r2' ret1 + ---@return 'r3' | 'r4' ... + local function (p, ...) end + ]] + }, + hover = [[ +```lua +function f(p: 'a1'|'a2', ...'a3'|'a4') + -> ret1: 'r1'|'r2' + 2. ...'r3'|'r4' +``` + +--- + +```lua +p: + | 'a1' + | 'a2' + +...(param): + | 'a3' + | 'a4' + +ret1: + | 'r1' + | 'r2' + +...(return): + | 'r3' + | 'r4' +```]] +} -- cgit v1.2.3