1
0
forked from aniani/vim

patch 8.2.4774: crash when using a number for lambda name

Problem:    Crash when using a number for lambda name.
Solution:   Check the type of the lambda reference.
This commit is contained in:
Bram Moolenaar
2022-04-17 15:06:35 +01:00
parent a9549c9e8f
commit 8b91e71441
4 changed files with 21 additions and 7 deletions

View File

@@ -66,6 +66,10 @@ function Test_lambda_fails()
echo assert_fails('echo 10->{a -> a + 2}', 'E107:')
call assert_fails('eval 0->(', "E110: Missing ')'")
call assert_fails('eval 0->(3)()', "E1275:")
call assert_fails('eval 0->([3])()', "E1275:")
call assert_fails('eval 0->({"a": 3})()', "E1275:")
call assert_fails('eval 0->(xxx)()', "E121:")
endfunc
func Test_not_lamda()