On 5/31/16 2:08 PM, Grisha Levit wrote:
> On Wed, May 25, 2016 at 3:29 PM, Chet Ramey <chet.ra...@case.edu
> <mailto:chet.ra...@case.edu>> wrote:
> 
> 
>     Thanks for the report.  Both of these cases should be caught
> 
> Is it deliberate that with the latest changes a faulty += RHS causes an
> existing valid nameref to be unset?

The code has always done that.  With more error checking happening at
assignment time instead of on reference, it's more apparent.  I'm working
on it.

> |$ declare -n ref=re $ declare -n ref+=f bash: ref: nameref variable self
> references not allowed $ declare -p ref bash: declare: ref: not found $
> declare -n ref=X $ declare -n ref+=/ bash: declare: `/': not a valid
> identifier $ *declare* -p ref bash: declare: ref: not found|
> 
> Also, this still seems to miss some stuff that would normally be caught:
> 
> |$ declare -n ref=ref[0] bash: declare: ref: nameref variable self
> references not allowed $ declare -n ref=re ref+=f[0] $ declare -p ref
> declare -n ref="ref[0]" |

Yes, though you still can't use it.

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

Reply via email to