On Oct 20, 2013 7:24 PM, "Bram Moolenaar" <[email protected]> wrote:
>
>
> ZyX wrote:
>
> > On Monday, October 14, 2013 11:40:48 PM UTC+4, ZyX wrote:
> > > Try the following code:
> > >
> > >     vim -u NONE -N -c "echo (0 && (function('tr'))(1, 2, 3))"
> > >
> > > . This will throw “E110: Missing ')'” error while it should throw
> > > nothing (after changing 0 to 1 it works fine effectively showing
> > > that I have no errors on && right side). I guess we must just allow
> > > handle_subscript handle any kind of subscripts when skipping
> > > (disable checks for rettv->v_type): this should also solve problem
> > > with “dict.0key_that_starts_with_number”.
> >
> > For expr7() such solution seem to work. For expr7.key this is not as
> > simple: I immediately found problems with dot used for string
> > concatenation. Patch for expr7(key) is attached.
> >
> > Note: patch is known to pass all tests, but I have not checked it
> > under valgrind (seems to not introduce any problems). No tests yet:
> > not sure where to put it. Test is as simple as checking that `echo (0
> > && (function('tr'))(1, 2, 3))` echoes zero and no errors: output
> > captured with `:redir` should contain only a few newlines and a zero.
>
> Thanks for the patch.
>
> Since you are fixing something that is an easily reproducible problem,
> please add a test for it.

That was the question: where? AFAIR I searched test headers for "expr" and
"func", but have not found anything appropriate.

>
> --
> LAUNCELOT: I am, sir. I am a Knight of King Arthur.
> FATHER:    'Mm ... very nice castle, Camelot ... very good pig country....
>                  "Monty Python and the Holy Grail" PYTHON (MONTY)
PICTURES LTD
>
>  /// Bram Moolenaar -- [email protected] -- 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
 ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui