diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-26 00:11:55 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-26 00:11:55 +0800 |
commit | ed64703ef9fec2b1c6736a0deb68bd567875a654 (patch) | |
tree | c46cc9347c00d8d55fe9a0b97a17ae629f474c8c /test | |
parent | 2c6f0f9bf83f9a44c466aaf0d45ed9f8eab6c117 (diff) | |
download | lua-language-server-ed64703ef9fec2b1c6736a0deb68bd567875a654.zip |
#1207 supports `---@return boolean ...`
Diffstat (limited to 'test')
-rw-r--r-- | test/type_inference/init.lua | 28 |
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() +]] |