Can you give us the .perl of $!total_interest, $interests and $interests.Rat? (perhaps even the .nude, too?)

On 29/10/15 10:31, Kamil Kułaga (via RT) wrote:
# New Ticket Created by  "Kamil Kułaga"
# Please include the string:  [perl #126485]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=126485 >


I've tried to substitute numeric with Rat (and the switch to FatRat) but found 
some issues in type checking. Errors does not occur on simple examples so I 
provide whole code.

       $!total_interest += $interests.Rat;

Normally it is not a problem to += two rats but here it becomes a problem.

     $ perl6 -v
      This is perl6 version 2015.10-46-g3c17701 built on MoarVM version 2015.10
     $ export MVM_SPESH_DISABLE=1
     $ panda install ./
     ==> Installing Mortage from a local directory './'
     ==> Fetching Mortage
     ==> Building Mortage
     ==> Testing Mortage
     Type check failed in assignment to $!total_interest; expected Rat but got 
Num
     in method throw at 
/home/kamil/.rakudobrew/moar-nom/install/share/perl6/runtime 
/CORE.setting.moarvm:1
     in method calc at 
/home/kamil/mortage6/.panda-work/1446107022_1/lib/Mortage.pm6:89
     in block <unit> at t/test.t:59

Reply via email to