diff src/eval.c @ 17387:2558f90045e5 v8.1.1692

patch 8.1.1692: using *{} for literal dict is not backwards compatible commit https://github.com/vim/vim/commit/b8be54dcc517c9d57b62409945b7d4b90b6c3071 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 14 18:22:59 2019 +0200 patch 8.1.1692: using *{} for literal dict is not backwards compatible Problem: Using *{} for literal dict is not backwards compatible. (Yasuhiro Matsumoto) Solution: Use ~{} instead.
author Bram Moolenaar <Bram@vim.org>
date Sun, 14 Jul 2019 18:30:04 +0200
parents cb008de2a6ec
children 40417757dffd
line wrap: on
line diff
--- 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);