From 259f1e944b96715fda25f7ba227da05bdb7e600f Mon Sep 17 00:00:00 2001 From: Philippe Altherr Date: Sat, 3 Dec 2022 21:03:36 -0800 Subject: 51071: fix ERR_RETURN for functions in conditional statements --- Test/C03traps.ztst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Test') diff --git a/Test/C03traps.ztst b/Test/C03traps.ztst index a8880673f..b7132da81 100644 --- a/Test/C03traps.ztst +++ b/Test/C03traps.ztst @@ -670,6 +670,22 @@ F:Must be tested with a top-level script rather than source or function >before-out >before-in + (set -o err_return + fn() { + print before-in + { false; true } && true + print after-in + } + print before-out + fn && true + print after-out + ) +0:ERR_RETURN not triggered on LHS of "&&" in function on LHS of "&&" (regression test) +>before-out +>before-in +>after-in +>after-out + mkdir -p zdotdir print >zdotdir/.zshenv ' setopt norcs errreturn -- cgit v1.2.3-70-g09d2