patch 9.1.0301: Vim9: heredoc start may be recognized in string
Problem: Vim9: heredoc start may be recognized in string.
Solution: Don't skip to closing bracket for invalid list assignment.
(zeertzjq)
closes: #14472
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/test_let.vim b/src/testdir/test_let.vim
index 1d61635..5ee2e9b 100644
--- a/src/testdir/test_let.vim
+++ b/src/testdir/test_let.vim
@@ -409,10 +409,16 @@
endtry
try
+ let [] =<< trim TEXT
+ TEXT
+ call assert_report('No exception thrown')
+ catch /E475:/
+ catch
+ call assert_report('Caught exception: ' .. v:exception)
+ endtry
+
+ try
let [a b c] =<< trim TEXT
- change
- insert
- append
TEXT
call assert_report('No exception thrown')
catch /E475:/
@@ -422,9 +428,6 @@
try
let [a; b; c] =<< trim TEXT
- change
- insert
- append
TEXT
call assert_report('No exception thrown')
catch /E452:/