comparison src/testdir/test_lambda.vim @ 28499:a35d54d01ade v8.2.4774

patch 8.2.4774: crash when using a number for lambda name Commit: https://github.com/vim/vim/commit/8b91e71441069b1dde9ac9ff9d9a829b1b4aecca Author: Bram Moolenaar <Bram@vim.org> Date: Sun Apr 17 15:06:35 2022 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Sun, 17 Apr 2022 16:15:03 +0200
parents 6047c7ea7963
children c6aadb2c4cd7
comparison
equal deleted inserted replaced
28498:581ec553914d 28499:a35d54d01ade
64 call assert_fails('echo {a, a -> a + a}(1, 2)', 'E853:') 64 call assert_fails('echo {a, a -> a + a}(1, 2)', 'E853:')
65 call assert_fails('echo {a, b -> a + b)}(1, 2)', 'E451:') 65 call assert_fails('echo {a, b -> a + b)}(1, 2)', 'E451:')
66 echo assert_fails('echo 10->{a -> a + 2}', 'E107:') 66 echo assert_fails('echo 10->{a -> a + 2}', 'E107:')
67 67
68 call assert_fails('eval 0->(', "E110: Missing ')'") 68 call assert_fails('eval 0->(', "E110: Missing ')'")
69 call assert_fails('eval 0->(3)()', "E1275:")
70 call assert_fails('eval 0->([3])()', "E1275:")
71 call assert_fails('eval 0->({"a": 3})()', "E1275:")
72 call assert_fails('eval 0->(xxx)()', "E121:")
69 endfunc 73 endfunc
70 74
71 func Test_not_lamda() 75 func Test_not_lamda()
72 let x = {'>' : 'foo'} 76 let x = {'>' : 'foo'}
73 call assert_equal('foo', x['>']) 77 call assert_equal('foo', x['>'])