Hi,
Doing some experiments (Pike 7.4.28)... So:
---snip---
class Parent {
mixed
`[](mixed ... args)
{
Stdio.stderr->write("Called `[](%O) in %O: %O\n", args, this, ::`[](@args));
return ::`[](@args);
}
}
class Child {
inherit Parent;
}
int
main(int argc, array(string)argv)
{
Child obj = Child();
mixed val;
val = obj[-1..1]; // Just in case - optimizer will cut the code when "val =" is removed.
}
---snip---
The attempt to execute gives:
Bad argument 1 to ::->(). Expected string
Unknown program: ::->(-1,1)
object.c:2105: object.c:2105()->()(-1,1)
inh2.pike:5: inh2()->Child()->](-1,1)
inh2.pike:20: inh2()->main(1,({"/home/aldem/src/pike/inh2.pike"}))
I don't have any definition of `->() nor any references to it... And
no references in docs that `->() and `[]() are equivalent...
In fact, inheritance doesn't matter - it is just my standard
template for test cases... Substitute Child to Parent and the error
will be exactly the same.
Not sure if problem exists with 7.5 or 7.4-cvs version - didn't
check it out (yet)...
Regards,
/Al