summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-26 00:11:55 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-26 00:11:55 +0800
commited64703ef9fec2b1c6736a0deb68bd567875a654 (patch)
treec46cc9347c00d8d55fe9a0b97a17ae629f474c8c /test
parent2c6f0f9bf83f9a44c466aaf0d45ed9f8eab6c117 (diff)
downloadlua-language-server-ed64703ef9fec2b1c6736a0deb68bd567875a654.zip
#1207 supports `---@return boolean ...`
Diffstat (limited to 'test')
-rw-r--r--test/type_inference/init.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 8cf98da5..e86983b6 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -3064,3 +3064,31 @@ local t
local <?f?> = t.f
]]
+
+TEST 'boolean' [[
+---@param ... boolean
+local function f(...)
+ local <?n?> = ...
+end
+]]
+
+TEST 'boolean' [[
+---@param ... boolean
+local function f(...)
+ local _, <?n?> = ...
+end
+]]
+
+TEST 'boolean' [[
+---@return boolean ...
+local function f() end
+
+local <?n?> = f()
+]]
+
+TEST 'boolean' [[
+---@return boolean ...
+local function f() end
+
+local _, <?n?> = f()
+]]