0
0
mirror of https://github.com/vim/vim.git synced 2025-10-03 05:14:07 -04:00

patch 8.2.3717: Vim9: error for constant list size is only given at runtime

Problem:    Vim9: error for constant list size is only given at runtime.
Solution:   Give the error at compile time if possible.
This commit is contained in:
Bram Moolenaar
2021-12-01 17:38:01 +00:00
parent e4eed8c6db
commit db9ff9ab5d
5 changed files with 49 additions and 6 deletions

View File

@@ -496,8 +496,9 @@ def Test_try_catch_throw()
endtry
assert_equal(266, n)
l = [1, 2, 3]
try
[n] = [1, 2, 3]
[n] = l
catch /E1093:/
n = 277
endtry
@@ -4327,7 +4328,8 @@ def Test_catch_exception_in_callback()
var x: string
var y: string
# this error should be caught with CHECKLEN
[x, y] = ['']
var sl = ['']
[x, y] = sl
catch
g:caught = 'yes'
endtry