roxen.lists.pike.general

Subject Author Date
Bug when using program as key of mapping ¹ùÑ©ËÉú—­zºZŸ ¤¢x¢ <¹ùÑ©ËÉú—­zºZŸ ¤¢x¢[at]nirgendwo> 25-08-2009
$ cat t.pike

 

mapping m=([]);

 

class SomeClass{}

 

class OutsideClass{

         class InsideClass(string|void dir,object|void room_design){

                   array t(){

                            return ({});

                            SomeClass; //Line A

                   }

         };

         void create()

         {

                   m[object_program(InsideClass("haha",SomeClass()))]=1;

         }

}

 

void main()

{

         object ob=OutsideClass();

         write("should be 1: %O\n",m[OutsideClass.InsideClass]);

}

 

$ pike t.pike

Sould be 1: 0

 

If remove Line A, the result is good:

 

$ pike t.pike

Sould be 1: 1

 

 

Xuesong Guo