*Synopsis*: [ku1] Moving local compound var into array does not work
CR 6805792 changed on Oct 28 2009 by <User 1-5HNZ8F>
=== Field ============ === New Value ============= === Old Value =============
Commit to Fix in Build snv_128 snv_127
Fixed in Build snv_128
Status 8-Fix Available 7-Fix in Progress
====================== =========================== ===========================
*Change Request ID*: 6805792
*Synopsis*: [ku1] Moving local compound var into array does not work
Product: solaris
Category: shell
Subcategory: korn93
Type: Defect
Subtype:
Status: 8-Fix Available
Substatus:
Priority: 3-Medium
Introduced In Release: solaris_nevada
Introduced In Build: snv_72
Responsible Engineer: <User 1-7MTUEB>
Keywords: opensolaris, oss-request, oss-sponsor
=== *Description* ============================================================
Category
shell
Sub-Category
korn
Description
The following attempt to move a local node into an associative array
fails like this:
-- snip --
typeset -C tree
function f1
{
nameref tr=$1
typeset -A tr.subtree
typeset -C node
node.one="hello"
node.two="world"
# move local note into the array
typeset -m tr.subtree["a_node"]=node
return 0
}
f1 tree
printf "%B\n" tree
exit 0
-- snip --
The output looks like this:
-- snip --
$ ksh93
varmovetest1.sh
(
(
)
ok
-- snip --
... but AFAIK it should print:
-- snip --
(
typeset -A subtree=(
[a_node]=(
one=hello
two=world
)
)
)
ok
-- snip --
testcase is available from
http://svn.genunix.org/repos/on/branches/ksh93/gisburn/scripts/tests/sun_solaris_varmovetest1.sh
Frequency
Always
Regression
No
Steps to Reproduce
Run testcase
Expected Result
-- snip --
(
typeset -A subtree=(
[a_node]=(
one=hello
two=world
)
)
)
ok
-- snip --
Actual Result
-- snip --
$ ksh93
varmovetest1.sh
(
(
)
ok
-- snip --
Error Message(s)
-
Test Case
typeset -C tree
function f1
{
nameref tr=$1
typeset -A tr.subtree
typeset -C node
node.one="hello"
node.two="world"
# move local note into the array
typeset -m tr.subtree["a_node"]=node
return 0
}
f1 tree
printf "%B\n" tree
exit 0
Workaround
None known.
Additional configuration information
Solaris 11/B106
*** (#1 of 1): 2009-02-16 02:59:38 GMT+00:00 <User 1-F4SZV>
=== *Public Comments* ========================================================
=== *Workaround* =============================================================
=== *Additional Details* =====================================================
Targeted Release: solaris_nevada
Commit To Fix In Build: snv_128
Fixed In Build: snv_128
Integrated In Build:
Verified In Build:
See Also: 6437624, 6793763
Duplicate of:
Hooks:
Hook1:
Hook2:
Hook3:
Hook4:
Hook5: <email address omitted>
Hook6: <email address omitted>
Program Management:
Root Cause: Insufficient Testing
Fix Affects Documentation: No
Fix Affects Localization: No
=== *History* ================================================================
Date Submitted: 2009-02-16 02:59:37 GMT+00:00
Submitted By: <User 1-F4SZV>
Status Changed Date Updated Updated By
3-Accepted 2009-02-24 14:00:34 GMT+00:00 <User 1-1SURPB>
6-Fix Understood 2009-06-16 15:26:24 GMT+00:00 <User 1-1SURPB>
7-Fix in Progress 2009-10-23 18:06:13 GMT+00:00 <User 1-7MTUEB>
8-Fix Available 2009-10-28 18:23:34 GMT+00:00 <User 1-5HNZ8F>
=== *Service Request* ========================================================
Impact: Significant
Functionality: Secondary
Severity: 3
Product Name: solaris
Product Release: solaris_nevada
Product Build: snv_106
Operating System: solaris_nevada
Hardware: generic
Submitted Date: 2009-02-16 02:59:38 GMT+00:00
=== *Multiple Release (MR) Cluster* - 0 ======================================