freebsd-nq/bin/sh/tests/builtins/local7.0
Jilles Tjoelker a9bdd616f9 sh: Clean a readonly local, even if the variable does not exist outside.
If a local variable has been made read-only, this should not prevent its
removal when the function returns.
2016-01-22 20:10:08 +00:00

11 lines
71 B
Plaintext

# $FreeBSD$
f() {
local x
readonly x=2
}
unset x
f
x=4
[ "$x" = 4 ]