diff src/vim9compile.c @ 20253:6f9010b6f7f9 v8.2.0682

patch 8.2.0682: Vim9: parsing function argument type can get stuck Commit: https://github.com/vim/vim/commit/1c0d44f8efae36c079cb8be395785827aa0b2737 Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 2 19:04:58 2020 +0200 patch 8.2.0682: Vim9: parsing function argument type can get stuck Problem: Vim9: parsing function argument type can get stuck. Solution: Bail out when not making progress.
author Bram Moolenaar <Bram@vim.org>
date Sat, 02 May 2020 19:15:04 +0200
parents e46e72aaff74
children aac52c32a91f
line wrap: on
line diff
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -1663,7 +1663,11 @@ skip_type(char_u *start)
 	++p;
 	while (*p != ')' && *p != NUL)
 	{
+	    char_u *sp = p;
+
 	    p = skip_type(p);
+	    if (p == sp)
+		return p;  // syntax error
 	    if (*p == ',')
 		p = skipwhite(p + 1);
 	}