[vim/vim] Vim9: wrong type for the rest of a tuple in an unpack assignment (PR #21059)

h_east (Vim Github Repository) <[email protected]>
Newsgroups gmane.editors.vim.devel
Message-ID <vim/vim/pull/[email protected]>
```
Problem:  In an unpack assignment the variable after the ";" gets the type
          of the whole tuple instead of the type of the remaining items.
          When the assigned value has type "any" it even gets a list type,
          so that a tuple cannot be assigned to it later.
Solution: Give the variable the type of the remaining items.  Keep "any"
          when it is not known whether a list or a tuple is assigned.
```

fixes: #21057
fixes: #21058
You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/21059

-- Commit Summary --

  * Vim9: wrong type for the rest of a tuple in an unpack assignment

-- File Changes --

    M src/testdir/test_tuple.vim (29)
    M src/vim9compile.c (5)
    M src/vim9instr.c (45)
    M src/vim9type.c (3)

-- Patch Links --

https://github.com/vim/vim/pull/21059.patch
https://github.com/vim/vim/pull/21059.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/vim/vim/pull/21059
You are receiving this because you are subscribed to this thread.

Message ID: <vim/vim/pull/[email protected]>

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/vim/vim/pull/21059%40github.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.