patch 9.0.0150: error for using #{ in an expression is a bit confusing

Problem:    Error for using #{ in an expression is a bit confusing.
Solution:   Mention that this error is only given for an expression.
            Avoid giving the error more than once. (closes #10855)
diff --git a/src/errors.h b/src/errors.h
index 3b23c88..977abbf 100644
--- a/src/errors.h
+++ b/src/errors.h
@@ -2984,8 +2984,8 @@
 	INIT(= N_("E1168: Argument already declared in the script: %s"));
 EXTERN char e_expression_too_recursive_str[]
 	INIT(= N_("E1169: Expression too recursive: %s"));
-EXTERN char e_cannot_use_hash_curly_to_start_comment[]
-	INIT(= N_("E1170: Cannot use #{ to start a comment"));
+EXTERN char e_cannot_use_hash_curly_to_start_comment_in_an_expression[]
+	INIT(= N_("E1170: Cannot use #{ to start a comment in an expression"));
 EXTERN char e_missing_end_block[]
 	INIT(= N_("E1171: Missing } after inline function"));
 EXTERN char e_cannot_use_default_values_in_lambda[]
diff --git a/src/eval.c b/src/eval.c
index 42b883e..8dfbb8f 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2157,6 +2157,8 @@
 		    break;
 	    p = nl;
 	}
+	else if (vim9_bad_comment(p))
+	    break;
 	if (*p != NL)
 	    break;
 	++p;  // skip another NL
@@ -2182,7 +2184,10 @@
 	    break;
 	p = skipwhite(next);
 	if (*p != NUL && !vim9_comment_start(p))
+	{
+	    (void)vim9_bad_comment(p);
 	    return next;
+	}
 	if (eval_next_line(NULL, evalarg) == NULL)
 	    break;
     }
diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim
index df65d72..f30cd8d 100644
--- a/src/testdir/test_vim9_expr.vim
+++ b/src/testdir/test_vim9_expr.vim
@@ -2823,6 +2823,8 @@
   v9.CheckDefAndScriptFailure(["var x = 'a' .. #{a: 1}"], 'E1170:', 1)
   v9.CheckDefAndScriptFailure(["var x = true ? #{a: 1}"], 'E1170:', 1)
 
+  v9.CheckDefAndScriptFailure(["var x = 'a'", " #{a: 1}"], 'E1170:', 1)
+
   v9.CheckDefAndScriptFailure(["var x = {a:8}"], 'E1069:', 1)
   v9.CheckDefAndScriptFailure(["var x = {a : 8}"], 'E1068:', 1)
   v9.CheckDefAndScriptFailure(["var x = {a :8}"], 'E1068:', 1)
diff --git a/src/version.c b/src/version.c
index acecc11..27d269e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -736,6 +736,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    150,
+/**/
     149,
 /**/
     148,
diff --git a/src/vim9script.c b/src/vim9script.c
index 14f36b4..e3cb992 100644
--- a/src/vim9script.c
+++ b/src/vim9script.c
@@ -183,9 +183,9 @@
     int
 vim9_bad_comment(char_u *p)
 {
-    if (p[0] == '#' && p[1] == '{' && p[2] != '{')
+    if (!did_emsg && p[0] == '#' && p[1] == '{' && p[2] != '{')
     {
-	emsg(_(e_cannot_use_hash_curly_to_start_comment));
+	emsg(_(e_cannot_use_hash_curly_to_start_comment_in_an_expression));
 	return TRUE;
     }
     return FALSE;