Discussion:
[ast-developers] Can't override a discipline function of a type in a namespace...
Roland Mainz
2013-08-31 00:56:02 UTC
Permalink
Hi!

----

The following testcase...
-- snip --
namespace org.terror.cthulhu
{
typeset -T x_t=(
integer i=0

function method_a
{
print "method_a"
}
)

function main
{
x_t x1
x_t x2=(
function method_a
{
print "method_a_mod"
}
)


x1.method_a
x2.method_a
}

main
}
-- snip --

... should AFAIK print...

-- snip --
$ ksh x.sh
method_a
method_a_mod
-- snip --

... but ast-ksh.2013-08-29 on SuSE 12.3/AMD64/64bit prints this:

-- snip --
$ ksh x.sh
x.sh[28]: main: line 17: x2.method_a: invalid discipline function
-- snip --

----

Bye,
Roland
--
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
Loading...