i guess, i need to create an example, but first i am trying to recreate the original problem with predef failing, so hold that question for a moment and help me to recreate the original problem that martin had observed:
$ cat main.pike void main() { object a=((program)"equal.pike")(); object b=a; if(a==b) write("equal"); }
$ cat equal.pike int(0..1) `==(mixed rel) { if (predef::`==(rel, this)) return 1; // This is never reached. }
this creates the loop, as previously noted.
now, the suggested solution was to do remove the "predef": $ cat equal.pike int(0..1) `==(mixed rel) { if (::`==(rel, this)) return 1; // This is never reached. }
$ pike main.pike equal.pike:3:Undefined identifier "::`==". Compilation failed. /usr/local/pike/7.6.7/lib/master.pike:346: master()->compile_string("int(0..1) `==(mixed rel)\n{ \n if (::`==(rel, t his))\n return 1; // This is never reached.\n}\n","/local/home/mbaehr/s rc/pike/inherit/equal/equal.pike",0,equal.pike,0) /usr/local/pike/7.6.7/lib/master.pike:813: master()->low_findprog("/local/home/mbaehr/src/pike/inherit/equal/equal"," .pike",0,0) /usr/local/pike/7.6.7/lib/master.pike:907: master()->findprog("/local/home/mbaehr/src/pike/inherit/equal/equal",".pik e",0,0) /usr/local/pike/7.6.7/lib/master.pike:955: master()->low_cast_to_program("equal","/local/home/mbaehr/src/pike/inherit /equal/main.pike",0,0) /usr/local/pike/7.6.7/lib/master.pike:977: master()->cast_to_program("equal.pike","/local/home/mbaehr/src/pike/inheri t/equal/main.pike",0) main.pike:3: /local/home/mbaehr/src/pike/inherit/equal/main()->main()
what am i missing here?