0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.2.1465: Vim9: subscript not handled properly

Problem:    Vim9: subscript not handled properly.
Solution:   Adjust error message.  Remove dead code.  Disallow string to
            number conversion in scripts.
This commit is contained in:
Bram Moolenaar
2020-08-16 14:48:19 +02:00
parent 829ac868b7
commit 56acb0943e
9 changed files with 71 additions and 67 deletions

View File

@@ -793,19 +793,20 @@ def Test_try_catch()
endtry
assert_equal(99, n)
# TODO: this will change when index on "any" works
try
n = g:astring[3]
catch /E714:/
catch /E1029:/
n = 77
endtry
assert_equal(77, n)
try
n = l[g:astring]
catch /E39:/
n = 77
catch /E1029:/
n = 88
endtry
assert_equal(77, n)
assert_equal(88, n)
try
n = s:does_not_exist