bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: self-reference to assoc.-array variable


From: Martin D Kealey
Subject: Re: self-reference to assoc.-array variable
Date: Tue, 20 Sep 2022 09:46:47 +1000

Regression appears to have occurred between bash-5.0.18 and bash-5.1-alpha
at commit 712f80b0. (I note that this commit is missing from the master
branch, which only includes bash-5.0.17 at commit.)
 I tried to find the change in the devel branch, but ugh, git diff between
devel & master is unhelpful.

On Fri, 16 Sept 2022 at 06:46, kurt <kurt@krzlprmpf.net> wrote:

> Configuration Information [Automatically generated, do not change]:
> Machine: x86_64
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS: -g -O2 -flto=auto -ffat-lto-objects -flto=auto
> -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security
> -Wall
> uname output: Linux kurt-OptiPlex-7020 5.15.0-47-generic #51-Ubuntu SMP
> Thu Aug 11 07:51:15 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
> Machine Type: x86_64-pc-linux-gnu
>
> Bash Version: 5.1
> Patch Level: 16
> Release Status: release
>
> Description:
>         a declaration like the following was possible before bash-version
> 5.1:
>                 declare -r -A MYAR=(
>                   ['first']="NUMBER ONE"
>                   # --- 'self-reference' to declaring array variable MYAR
>                   ['top']="${MYAR['first']}"
>                 )
>                 echo "${MYAR[@]}"
>         now bash complains with a syntax-error on the
> ['top']="${MYAR['first']}" construct
>
> Repeat-By:
>         execute the above example-code
>
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]