diff src/vim9compile.c @ 21512:81c47a694479 v8.2.1306

patch 8.2.1306: checking for first character of dict key is inconsistent Commit: https://github.com/vim/vim/commit/b13ab99908097d54e21ab5adad22f4ad2a8ec688 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jul 27 21:43:28 2020 +0200 patch 8.2.1306: checking for first character of dict key is inconsistent Problem: Checking for first character of dict key is inconsistent. Solution: Add eval_isdictc(). (closes https://github.com/vim/vim/issues/6546)
author Bram Moolenaar <Bram@vim.org>
date Mon, 27 Jul 2020 21:45:04 +0200
parents e87a97868bbc
children c7b2ce90c2de
line wrap: on
line diff
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -3758,7 +3758,7 @@ compile_subscript(
 	    if (next != NULL &&
 		    ((next[0] == '-' && next[1] == '>'
 				 && (next[2] == '{' || ASCII_ISALPHA(next[2])))
-		    || (next[0] == '.' && ASCII_ISALPHA(next[1]))))
+		    || (next[0] == '.' && eval_isdictc(next[1]))))
 	    {
 		next = next_line_from_context(cctx, TRUE);
 		if (next == NULL)
@@ -3922,7 +3922,7 @@ compile_subscript(
 		return FAIL;
 	    // dictionary member: dict.name
 	    p = *arg;
-	    if (eval_isnamec1(*p))
+	    if (eval_isdictc(*p))
 		while (eval_isnamec(*p))
 		    MB_PTR_ADV(p);
 	    if (p == *arg)