Hi,
while playing with OOP features, our engineer found following crash:
====================== [cut] =========================
#!/bin/ksh
typeset -T Something_t=(
typeset -liSh 'number of objects' count=0
typeset -lih 'some value' value=0
create() {
print "creation"
((_.count++))
}
)
.sh.type.Something_t=(value=42)
Something_t n1=()
Something_t n2=n1
echo "Number of objects: ${n1.count}, value=${n1.value}"
====================== [cut] =========================
Also I'd like to ask a question about aliases. Right now, if alias is
set inside of a sourced script, it does not have effect on sourced
script itself. For example:
testA.sh:
#!/bin/ksh
. ./testB.sh
echo "A\nB\nC\n"
testB.sh:
alias echo='echo -e'
alias echo
type echo
echo "1\n2\n\3\n"
output is:
echo='echo -e'
echo is an alias for 'echo -e'
1\n2\n\3\n
A
B
C
Is this expected behaviour?
Also I was asked whether ksh is expected to segfault on too deep
recursion. I think the answer is yes, but I'm asking because I was asked
for official answer. Anyway, from what I've tested, all shells crashes
except zsh that prints something like "recursion too deep" and terminates.
Michal
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers