diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-07-14 18:22:59 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-07-14 18:22:59 +0200 |
commit | b8be54dcc517c9d57b62409945b7d4b90b6c3071 (patch) | |
tree | f5eb85275a6b6f3a9eea3c819cb19e8c354f7991 /src/eval.c | |
parent | 37d9f175a4ab885052583746982d6bbfbe0095b9 (diff) |
patch 8.1.1692: using *{} for literal dict is not backwards compatiblev8.1.1692
Problem: Using *{} for literal dict is not backwards compatible. (Yasuhiro
Matsumoto)
Solution: Use ~{} instead.
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/eval.c b/src/eval.c index ae89f7e2bc..1d290bcbfe 100644 --- a/src/eval.c +++ b/src/eval.c @@ -4266,7 +4266,7 @@ eval6( for (;;) { op = **arg; - if ((op != '*' || (*arg)[1] == '{') && op != '/' && op != '%') + if (op != '*' && op != '/' && op != '%') break; if (evaluate) @@ -4392,7 +4392,7 @@ eval6( * (expression) nested expression * [expr, expr] List * {key: val, key: val} Dictionary - * *{key: val, key: val} Dictionary with literal keys + * ~{key: val, key: val} Dictionary with literal keys * * Also handle: * ! in front logical NOT @@ -4577,9 +4577,9 @@ eval7( break; /* - * Dictionary: *{key: val, key: val} + * Dictionary: ~{key: val, key: val} */ - case '*': if ((*arg)[1] == '{') + case '~': if ((*arg)[1] == '{') { ++*arg; ret = dict_get_tv(arg, rettv, evaluate, TRUE); |