$ ./pike -mmaster.pike lyskom_1253939.pike lyskom_1253939.pike:12:Index "Bar" not present in module "Foo". Pike: Failed to compile script: Compilation failed.
master.pike:2674: master()->_main(({"./pike","-mmaster.pike","lyskom_1253939.pike"}),({"PWD=/ home/grubba/src/Pike/7.7/build/sunos-5.8-sun4u","TZ=MET","ORACLE_SID=TEST" ,"WINDOWID=192937997","PAGER=less","LC_MESSAGES=C",,,41}))
Which is more or less what I expect.
After commenting out line 12, I however get:
$ ./pike -mmaster.pike lyskom_1253939.pike ({ /* 1 element */ "Bar" }) ({ /* 1 element */ "get_bar" })
Which shows a bug in program_indices(). Fixed:
$ ./pike -mmaster.pike lyskom_1253939.pike ({ }) ({ /* 1 element */ "get_bar" })
/ Henrik Grubbström (Lysator)
Previous text:
2004-08-13 14:02: Subject: CMOD questions
class Foo { static class Bar { }
object get_bar() { return Bar(); } }
void main() {
write("%O\n", indices(Foo)); write("%O\n", indices(Foo())); write("%O\n", Foo.Bar()); exit(0); }
gives me
({ /* 1 element */ "Bar" }) ({ /* 2 elements */ "get_bar", "Bar" }) /home/marage/src/Pike/pf-7.7/test()->Foo()->Bar()
Perhaps something is broken then, or doesn't the static keyword in pike-code do the same thing as ID_STATIC in cmod?
/ Marcus Agehall (PacketFront)