2017-03-20 16:29 GMT+03:00 Christian Brabandt <[email protected]>:
> Hi,
> is this supposed to work or not?
>
> let a='foobar'
> let c={}
> let c.{a} = 10
>
> Currently this gives E713: Cannot use empty key for Dictionary
>
> However reading :h curly-braces-names makes it sound like it should
> work?

No, it should not. In `dict.key` `.key` is not a part of a variable
name, it is a syntax sugar for `['key']`. So your case does not fall
under “regular variable name” definition. Also see `:h expr-entry`, it
explicitly states that curly braces names cannot be used.

BTW, now when empty keys are allowed should not E713 be something like
“Cannot use empty key in expr-entry”? It is definitely possible to use
empty keys for dictionaries now, just not with this syntax.

>
> Best,
> Christian
> --
> Ich wähle meine Freunde nach ihrem guten Aussehen, meine Bekannten
> nach ihrem Charakter und meine Feinde nach ihrem Verstand.
>                 -- Oscar Wilde
>
> --
> --
> 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/d/optout.

-- 
-- 
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/d/optout.

Raspunde prin e-mail lui