# New Ticket Created by  mt1957 
# Please include the string:  [perl #127339]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=127339 >


l.s.

In REPL;

 > my Duration $d .= new(10);
10
 > $d += 1000
1010
 > $d -= 900
110
 > $d *= 2
Type check failed in assignment to $d; expected Duration but got Num
   in block <unit> at <unknown file> line 1
 > $d /= 2
Type check failed in assignment to $d; expected Duration but got Num
   in block <unit> at <unknown file> line 1
 > $d * 2
220
 > $d .= new($d * 2)
220


Conclusion is that += and -= works but *= and /= do not while $d * 2 
gives a proper answer without problem. Only last method works.

Greetings
Marcel Timmerman


This is Rakudo version 2015.12-201-g2a8ca94 built on MoarVM version 
2015.12-29-g8079ca5
implementing Perl 6.c.

Reply via email to