Mercurial > vim
comparison src/testdir/test_vim9_cmd.vim @ 21212:874a28fac941 v8.2.1157
patch 8.2.1157: Vim9: dict.name is not recognized as an expression
Commit: https://github.com/vim/vim/commit/0a47e0970a0e5d99aa7089169e0bcca0401decce
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jul 8 18:30:06 2020 +0200
patch 8.2.1157: Vim9: dict.name is not recognized as an expression
Problem: Vim9: dict.name is not recognized as an expression.
Solution: Recognize ".name". (closes https://github.com/vim/vim/issues/6418)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 08 Jul 2020 18:45:07 +0200 |
parents | f45ce1ce284c |
children | 4be91a7eafb2 |
comparison
equal
deleted
inserted
replaced
21211:c998116fceb8 | 21212:874a28fac941 |
---|---|
202 endfunc | 202 endfunc |
203 [1, | 203 [1, |
204 2, | 204 2, |
205 3]->RetArg() | 205 3]->RetArg() |
206 assert_equal([1, 2, 3], res) | 206 assert_equal([1, 2, 3], res) |
207 END | |
208 CheckScriptSuccess(lines) | |
209 enddef | |
210 | |
211 def Test_dict_member() | |
212 let test: dict<list<number>> = {'data': [3, 1, 2]} | |
213 test.data->sort() | |
214 assert_equal(#{data: [1, 2, 3]}, test) | |
215 test.data | |
216 ->reverse() | |
217 assert_equal(#{data: [3, 2, 1]}, test) | |
218 | |
219 let lines =<< trim END | |
220 vim9script | |
221 let test: dict<list<number>> = {'data': [3, 1, 2]} | |
222 test.data->sort() | |
223 assert_equal(#{data: [1, 2, 3]}, test) | |
207 END | 224 END |
208 CheckScriptSuccess(lines) | 225 CheckScriptSuccess(lines) |
209 enddef | 226 enddef |
210 | 227 |
211 def Test_bar_after_command() | 228 def Test_bar_after_command() |