diff src/vim9expr.c @ 27539:ce4c2f4ce1f9 v8.2.4296

patch 8.2.4296: Vim9: not all code covered by tests Commit: https://github.com/vim/vim/commit/83d0cec95697c244c8096c78aa806469302a8e19 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Feb 4 21:17:58 2022 +0000 patch 8.2.4296: Vim9: not all code covered by tests Problem: Vim9: not all code covered by tests. Solution: Add a few more tests for corner cases. Fix hang when single quote is missing.
author Bram Moolenaar <Bram@vim.org>
date Fri, 04 Feb 2022 22:30:04 +0100
parents 29104ffb4dca
children 68eac9355e49
line wrap: on
line diff
--- a/src/vim9expr.c
+++ b/src/vim9expr.c
@@ -2824,8 +2824,10 @@ compile_expr1(char_u **arg, cctx_T *cctx
     // Ignore all kinds of errors when not producing code.
     if (cctx->ctx_skip == SKIP_YES)
     {
+	int		prev_did_emsg = did_emsg;
+
 	skip_expr_cctx(arg, cctx);
-	return OK;
+	return did_emsg == prev_did_emsg ? OK : FAIL;
     }
 
     // Evaluate the first expression.