diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-28 15:12:57 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-28 15:12:57 +0800 |
commit | 599b44716801aea385e5726a37c788cdf674f78a (patch) | |
tree | e9c6ab184c87113355a8e39e37041a2bb198f1f5 /test | |
parent | d5327b0fc28e638ff79845846981358938deb9f2 (diff) | |
download | lua-language-server-599b44716801aea385e5726a37c788cdf674f78a.zip |
fix #1242
wrong `sindex` in multi-assign which last exp is `call` or `varargs`
Diffstat (limited to 'test')
-rw-r--r-- | test/type_inference/init.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 4b745c0d..b5814e29 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -3149,3 +3149,21 @@ TEST 'A' [[ ---@type A local <?s?> = '' ]] + +TEST 'number' [[ +---@return number +local function f() end +local x, <?y?> = 1, f() +]] + +TEST 'boolean' [[ +---@return number, boolean +local function f() end +local x, y, <?z?> = 1, f() +]] + +TEST 'number' [[ +---@return number, boolean +local function f() end +local x, y, <?z?> = 1, 2, f() +]] |