On 4/23/20 8:02 PM, Ross Goldberg wrote:

> Bash Version: 5.0
> Patch Level: 16
> Release Status: release
> 
> Description:
> If a function, f, declares a local readonly variable, v, using local -r, an
> error occurs if f calls another function, g, that declares its own local
> variable v (therefore shadowing v from f) and that assigns v to an array in
> the same statement as the shadowing declaration.
> 
> g can, however, assign v to a scalar in a shadowing declaration.
> 
> g can also assign a shadowing v to an array, as long as it isn't assigned
> in the same statement as the declaration.

Thanks for the report. There will be a fix for this in the next devel
branch push.

Chet

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

Reply via email to