On Tue, 12 Apr 2005, Nicholas Clark wrote:

I think that there are 2 bugs here

1: Morphing from enum_class_PerlString to enum_class_BigInt or
enum_class_Complex looks broken. The return in the second if clause will
quit the function and the DYNSELF.init() will never get called.

Can anyone easily write a regression test that demonstrates this

This code:

   new P0, .PerlString
   new P1, .BigInt
   typeof I1, P1
   morph P0, I1
   set P0, 123
   print P0
   end

 segfaults for me with the latest snapshot of parrot, but prints '123' as
 expected if you remove the two lines mentioned below. The analogous test
 with Complex instead of BigInt appears to work regardless of whether the
 lines are present or not.

I think that the cure is to remove

           SELF->vtable = Parrot_base_vtables[type];
           return;


I've also re-run the test suite with these lines removed, and all existing tests still pass.

 Hope this is useful,
 Simon

Reply via email to