[vim/vim] Vim9: assignment to a member of an object member fails (PR #21085)
h_east (Vim Github Repository) <[email protected]>
| Newsgroups | gmane.editors.vim.devel |
|---|---|
| Message-ID | <vim/vim/pull/[email protected]> |
```
Problem: Using an operator on a member of an object that is itself a
member of an object gives E909, and a plain assignment to it
stores the value in the wrong member.
Solution: When the last index is split off from the name, forget the
member index found for the first name. The index is compiled
before the variable, thus do not use the type that loading the
variable produced. Load the member of an object like an
expression does instead of indexing it.
```
fixes: #21084
You can view, comment on, or merge this pull request online at:
https://github.com/vim/vim/pull/21085
-- Commit Summary --
* Vim9: assignment to a member of an object member fails
-- File Changes --
M src/proto/vim9expr.pro (1)
M src/testdir/test_vim9_class.vim (61)
M src/vim9compile.c (21)
M src/vim9expr.c (2)
-- Patch Links --
https://github.com/vim/vim/pull/21085.patch
https://github.com/vim/vim/pull/21085.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/vim/vim/pull/21085
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/21085%40github.com.