Version ABIJM 93v- 2014-07-21, we can't use typeset -c to copy an
array into a type:

ksh -c 'typeset -T x_t=( typeset -a ar ; function grab { typeset -c
_.ar=$1 ; } ; ) ; function foo { nameref c=$1 ; x_t c.i ; nameref
i=c.i ; typeset -a c.a1=( 1 2 3) ; i.grab c.a1 ;} ; compound cv ; foo
cv ; print -v cv'
(
        typeset -a a1=(
                1
                2
                3
        )
        x_t i=(
                typeset -C -a ar
        )
)

It should print:
(
        typeset -a a1=(
                1
                2
                3
        )
        x_t i=(
                typeset -a ar=(
                        1
                        2
                        3
                )
        )
)

Changing the type of function from function foo to foo() is a
workaround, but for the final production script we need local
variables.

Lionel
_______________________________________________
ast-developers mailing list
ast-developers@lists.research.att.com
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to