From 7404c6010dd7abd4339a4ffd6961f2a420fe7ddb Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 6 Nov 2022 14:50:09 +0800 Subject: vim-patch:8.2.3055: strange error for assigning to "x.key" on non-dictionary Problem: Strange error for assigning to "x.key" on non-dictionary. Solution: Add a specific error message. (closes vim/vim#8451) https://github.com/vim/vim/commit/3a3b10e87a10dd0bc355618dbfc4a0a6c828aad7 Co-authored-by: Bram Moolenaar --- src/nvim/testdir/test_let.vim | 2 +- src/nvim/testdir/test_listdict.vim | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_let.vim b/src/nvim/testdir/test_let.vim index cb883fc238..49f656c787 100644 --- a/src/nvim/testdir/test_let.vim +++ b/src/nvim/testdir/test_let.vim @@ -276,7 +276,7 @@ func Test_let_errors() let s = "var" let var = 1 call assert_fails('let var += [1,2]', 'E734:') - call assert_fails('let {s}.1 = 2', 'E18:') + call assert_fails('let {s}.1 = 2', 'E1203:') call assert_fails('let a[1] = 5', 'E121:') let l = [[1,2]] call assert_fails('let l[:][0] = [5]', 'E708:') diff --git a/src/nvim/testdir/test_listdict.vim b/src/nvim/testdir/test_listdict.vim index 21d21ce428..3d90222b90 100644 --- a/src/nvim/testdir/test_listdict.vim +++ b/src/nvim/testdir/test_listdict.vim @@ -294,6 +294,9 @@ func Test_dict_assign() let d.1 = 1 let d._ = 2 call assert_equal({'1': 1, '_': 2}, d) + + let n = 0 + call assert_fails('let n.key = 3', 'E1203: Dot can only be used on a dictionary: n.key = 3') endfunc " Function in script-local List or Dict -- cgit From ed01ef7fa5c2611748f90acfdc2145b22629dc36 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 6 Nov 2022 15:11:48 +0800 Subject: vim-patch:9.0.0355: check for uppercase char in autoload name is wrong Problem: Check for uppercase char in autoload name is wrong, it checks the name of the script. Solution: Remove the check. (closes vim/vim#11031) https://github.com/vim/vim/commit/6c667bdc9489963102bd6c46b1b73e4d43c034ce Co-authored-by: thinca --- src/nvim/testdir/test_let.vim | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_let.vim b/src/nvim/testdir/test_let.vim index 49f656c787..35745e9c6a 100644 --- a/src/nvim/testdir/test_let.vim +++ b/src/nvim/testdir/test_let.vim @@ -6,6 +6,10 @@ func Test_let() let Test104#numvar = function('tr') call assert_equal("function('tr')", string(Test104#numvar)) + let foo#tr = function('tr') + call assert_equal("function('tr')", string(foo#tr)) + unlet foo#tr + let a = 1 let b = 2 -- cgit