To: vim_dev@googlegroups.com Subject: Patch 7.4.2076 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.2076 Problem: Syntax error when dict has '>' key. Solution: Check for endchar. (Ken Takata) Files: src/userfunc.c, src/testdir/test_lambda.vim *** ../vim-7.4.2075/src/userfunc.c 2016-07-19 21:30:07.707499837 +0200 --- src/userfunc.c 2016-07-19 22:38:51.113398209 +0200 *************** *** 150,156 **** hash_init(&func_hashtab); } ! /* Get function arguments. */ static int get_function_args( char_u **argp, --- 150,158 ---- hash_init(&func_hashtab); } ! /* ! * Get function arguments. ! */ static int get_function_args( char_u **argp, *************** *** 232,238 **** break; } } ! ++p; /* skip the ')' */ *argp = p; return OK; --- 234,242 ---- break; } } ! if (*p != endchar) ! goto err_ret; ! ++p; /* skip "endchar" */ *argp = p; return OK; *** ../vim-7.4.2075/src/testdir/test_lambda.vim 2016-07-15 21:24:41.197452549 +0200 --- src/testdir/test_lambda.vim 2016-07-19 22:39:14.929152736 +0200 *************** *** 46,48 **** --- 46,53 ---- call assert_fails('echo {a, a -> a + a}(1, 2)', 'E15:') call assert_fails('echo {a, b -> a + b)}(1, 2)', 'E15:') endfunc + + func Test_not_lamda() + let x = {'>' : 'foo'} + call assert_equal('foo', x['>']) + endfunc *** ../vim-7.4.2075/src/version.c 2016-07-19 22:31:31.637930306 +0200 --- src/version.c 2016-07-19 22:37:20.766329544 +0200 *************** *** 760,761 **** --- 760,763 ---- { /* Add new patch number below this line */ + /**/ + 2076, /**/ -- There are 2 kinds of people in my world: those who know Unix, Perl, Vim, GNU, Linux, etc, and those who know COBOL. It gets very difficult for me at parties, not knowing which group to socialise with :-) Sitaram Chamarty /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///