bug-bash
[Top][All Lists]
Advanced

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

Re: nameref pointing to array element


From: Chet Ramey
Subject: Re: nameref pointing to array element
Date: Thu, 23 Apr 2020 17:00:48 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

On 4/22/20 6:05 PM, Daniel Molina wrote:
> Hello,
> 
> Is the following an intended behavior? Undefined? A bug?
> 
> $ a[1]=2; declare -n ref=a[1]; echo $ref $((ref))
> 2 0

Thanks for the report. It looks like a bug, even though the rules for
evaluating strings in the expression evaluator are slightly different
from the ones for nameref resolution.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/



reply via email to

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