bug-bash
[Top][All Lists]
Advanced

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

${param@a} should bypass unbound variable check or be processed ahead of


From: konsolebox
Subject: ${param@a} should bypass unbound variable check or be processed ahead of it.
Date: Tue, 1 Oct 2024 15:54:59 +0800

# declare -A x
# echo ${x@a}
A
# set -u
# echo ${x@a}
bash: x: unbound variable

Obvious workaround would be to disable `set -u` temporarily or assign
a temporary array value but that shouldn't need to be done.

Same thing happens with `declare -A x=()`.

# bash --version
GNU bash, version 5.3.0(1)-beta (x86_64-pc-linux-gnu)


-- 
konsolebox



reply via email to

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