diff src/vim9compile.c @ 27716:4097434c7c67 v8.2.4384

patch 8.2.4384: Vim9: error message not tested, some code not tested Commit: https://github.com/vim/vim/commit/bc510064027da8024d59460c9c816aea4ffac096 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Feb 14 21:19:04 2022 +0000 patch 8.2.4384: Vim9: error message not tested, some code not tested Problem: Vim9: error message not tested, some code not tested. Solution: Add a couple of test cases. Give an error for a command modifier without a command.
author Bram Moolenaar <Bram@vim.org>
date Mon, 14 Feb 2022 22:30:03 +0100
parents 072c7ae27b06
children fdc841530372
line wrap: on
line diff
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -2761,13 +2761,7 @@ compile_def_function(
 	cctx.ctx_has_cmdmod = FALSE;
 	if (parse_command_modifiers(&ea, &errormsg, &local_cmdmod, FALSE)
 								       == FAIL)
-	{
-	    if (errormsg != NULL)
-		goto erret;
-	    // empty line or comment
-	    line = (char_u *)"";
-	    continue;
-	}
+	    goto erret;
 	generate_cmdmods(&cctx, &local_cmdmod);
 	undo_cmdmod(&local_cmdmod);