Hi!

----

A 3rd-party customer hit an old issue with associative array
initalisation in types when the types are nested.

Example:
The following testcase...
-- snip --
$ ksh -c 'typeset -T y_t=( typeset -A ar=( ["a"]=1 ["z"]=666 ) ) ;
typeset -T f_t=( y_t a ; y_t b ) ; compound c=( f_t f ; y_t y ); print
-v c'
-- snip --
... should AFAIK print...
-- snip --
(
        f_t f=(
                y_t a=(
                        typeset -A ar=(
                                [a]=1
                                [z]=666
                        )
                )
                y_t b=(
                        typeset -A ar=(
                                [a]=1
                                [z]=666
                        )
                )
        )
        y_t y=(
                typeset -A ar=(
                        [a]=1
                        [z]=666
                )
        )
)
-- snip --
... but ast-ksh.2013-05-24 prints this:
-- snip --
(
        f_t f=(
                y_t a=(
                        typeset -C -a ar
                )
                y_t b=(
                        typeset -C -a ar
                )
        )
        y_t y=(
                typeset -A ar=(
                        [a]=1
                        [z]=666
                )
        )
)
-- snip --

The issue here is that c.f.a.ar and c.f.b.ar are printed as indexed
compound array while it should be plain associative string arrays with
pre-set elements "a" and "z" (c.y.ar shows how it should look like)
...

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) [email protected]
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to