Mercurial > vim
comparison src/testdir/test_lambda.vim @ 18851:3cf9529b3a4a v8.1.2412
patch 8.1.2412: crash when evaluating expression with error
Commit: https://github.com/vim/vim/commit/0ff822d2ebf0d130516631734b00179ba8dd8251
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 8 18:41:34 2019 +0100
patch 8.1.2412: crash when evaluating expression with error
Problem: Crash when evaluating expression with error. (Dhiraj Mishra)
Solution: Check parsing failed. (closes https://github.com/vim/vim/issues/5329)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 08 Dec 2019 18:45:03 +0100 |
parents | 91cac682b09a |
children | 2a017e9dc6da |
comparison
equal
deleted
inserted
replaced
18850:cdf752086b54 | 18851:3cf9529b3a4a |
---|---|
300 func Test_lambda_with_index() | 300 func Test_lambda_with_index() |
301 let List = {x -> [x]} | 301 let List = {x -> [x]} |
302 let Extract = {-> function(List, ['foobar'])()[0]} | 302 let Extract = {-> function(List, ['foobar'])()[0]} |
303 call assert_equal('foobar', Extract()) | 303 call assert_equal('foobar', Extract()) |
304 endfunc | 304 endfunc |
305 | |
306 func Test_lambda_error() | |
307 " This was causing a crash | |
308 call assert_fails('ec{@{->{d->()()', 'E15') | |
309 endfunc |