On Sun, September 29, 2013 16:01, ZyX wrote:
> Try the following code:
>
>     let d={'0d': 1}
>     if 0 && (d.0d)
>     endif
>
> . This code is completely correct if you replace `if 0` with `if 1`, but
> with `if 0` it throws
>
>
>     Error detected while processing /home/zyx/tmp/vim/subscript-bug.vim:
>     line    2:
>     E110: Missing ')'
>     E15: Invalid expression: 0 && (d.0d)
>
> . Reason is the following: when `evaluate` argument is set to FALSE in
> eval7() handle_subscript does not take .0d as dictionary key (because it
> checks for variable type which is VAR_UNKNOWN if evaluate is FALSE). Thus
> `.0d` is handled in eval5() like string concatenation and when it tries to
> evaluate second argument ā€œ0dā€ in eval7() it is handled like number in that
> big switch(**arg) statement. As a number it can consume only leading zero,
> which means when eval7() *that is handling top ā€œ(d.0d)ā€ expression* sees
> that in place of getting **arg equal to ')' it gets **arg equal to 'd' and
> errors out.

This looks a little bit like the bug that has been fixed with 7.3.841.

Nevertheless the fix seems more complicated this time, as I don't know
how to only consume the argument for dictionaries while leaving string
concatenation alone.

regards,
Christian

-- 
-- 
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