# New Ticket Created by Michael Cartmell # Please include the string: [perl #77126] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=77126 >
mich...@wslx1:working> perl6 -v This is Rakudo Perl 6, version 2010.07-47-g9fd5eaa built on parrot 2.6.0 Copyright 2008-2010, The Perl Foundation The following my Complex $c = 1; fails at runtime with the error message Type check failed for assignment in '&infix:<=>' at line 1 in main program body at line 13:t.p6 Declaring it as my Complex $c = 1 + 0i; works OK. The following is acceptable my Complex $c = 1i; say $c; # 0 + 1i as is my Rat $r = 1.0; my Complex $c = 1 + 0i; say $c + $r; # 2 + 0i For consistency it should be possible to leave out the imaginary value from a Complex declaration where it is 0. Regards, Michael