On 20 Apr, 07:45, "Vasily Chekalkin via RT" <parrotbug- [email protected]> wrote: > On Wed Oct 08 08:09:53 2008, julianalbo wrote: > > > On Wed, Oct 8, 2008 at 4:56 PM, Patrick R. Michaud > > <[email protected]> wrote: > > I don't know who did it, but on r38219 both examples produces expected > results. > > $ ./parrot w.pir > 1+0i > 1+0i > 0+0i > > Resolving ticket.
This hasn't been resolved. The test script makes a couple of unlucky assumptions. For example if you change the imaginary part of 'a' to 1 then the result is wrong. It looks like the subclass is using a plain integer subtraction and not a complex one. .sub main $P0 = subclass 'Complex', 'Perl6Complex' .local pmc a, b, c ## a = 1 + 0i a = new 'Perl6Complex' a['real'] = 1 a['imag'] = 1 print a print ' - ' ## b = 1 + 0i b = new 'Perl6Complex' b['real'] = 1 b['imag'] = 0 print b print ' = ' ## c = a - b c = sub a, b say c .end =begin output 1+1i - 1+0i = 0+0i =end output =begin expected_output 1+1i - 1+0i = 0+1i =end expected_output _______________________________________________ http://lists.parrot.org/mailman/listinfo/parrot-dev
