Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: 5.0.8 regression regarding $() in arithmetic for-loops



On Monday 27 July 2015 08:34:49 Bart Schaefer wrote:
> This happens after this example too:
> 
> } % for (( ; $(true) ; )) do echo yes; done
> } zsh: parse error
> } zsh: parse error near `$(true) ; )) do echo...'
> 
> But not after this example:
> 
> } % for (( ; ; $(true) )) do echo yes; done
> } zsh: parse error near `true'
> } zsh: parse error near `$(true) )) do echo y...'
> 
> I suspect we have a wordcode problem similar to the one with "case"
> statements that was fixed earlier (although from a different parser
> change).
> 
> #0  0x080ca7c1 in has_token (s=0x0) at ../../zsh-5.0/Src/utils.c:2030
> #1  0x080a7115 in ecstrcode (s=0x0) at ../../zsh-5.0/Src/parse.c:390
> #2  0x080a83f5 in par_cmd (cmplx=0xbff140ec, zsh_construct=0)

It seems to be caused by the following commit:

http://sourceforge.net/p/zsh/code/ci/c0d01a6f

Kamil



Messages sorted by: Reverse Date, Date, Thread, Author