diff src/vim9compile.c @ 19848:36d629aa3d6e v8.2.0480

patch 8.2.0480: Vim9: some code is not tested Commit: https://github.com/vim/vim/commit/0b37a2f379f36d097e7fa90a3e86da6a29ed2aaa Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 29 21:38:15 2020 +0200 patch 8.2.0480: Vim9: some code is not tested Problem: Vim9: some code is not tested. Solution: Add more tests.
author Bram Moolenaar <Bram@vim.org>
date Sun, 29 Mar 2020 21:45:03 +0200
parents 6500dcaf8e1a
children eddc81783052
line wrap: on
line diff
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -2622,11 +2622,14 @@ compile_subscript(
 	    else
 	    {
 		// method call:  list->method()
-		for (p = *arg; eval_isnamec1(*p); ++p)
+		p = *arg;
+		if (ASCII_ISALPHA(*p) && p[1] == ':')
+		    p += 2;
+		for ( ; eval_isnamec1(*p); ++p)
 		    ;
 		if (*p != '(')
 		{
-		    semsg(_(e_missing_paren), arg);
+		    semsg(_(e_missing_paren), *arg);
 		    return FAIL;
 		}
 		// TODO: base value may not be the first argument