about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/parse.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 885b7ed91..2a6b68368 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2021-09-06  Bart Schaefer  <schaefer@zsh.org>
 
+	* Marlon Richert: 49378: Src/parse.c: skip check for collision
+	of aliases and functions when NO_EXEC
+
 	* 49282: set $0 correctly when calling functions from hooks
 
 	* 49266: fix segfault on metacharacters in long job texts
diff --git a/Src/parse.c b/Src/parse.c
index be26112a5..10d193ba1 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -2052,7 +2052,7 @@ par_simple(int *cmplx, int nr)
 	    /* Error if preceding assignments */
 	    if (assignments || postassigns)
 		YYERROR(oecused);
-	    if (hasalias && !isset(ALIASFUNCDEF) && argc &&
+	    if (isset(EXECOPT) && hasalias && !isset(ALIASFUNCDEF) && argc &&
 		hasalias != input_hasalias()) {
 		zwarn("defining function based on alias `%s'", hasalias);
 		YYERROR(oecused);