# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #74624]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=74624 >


<sorear> rakudo: say 0.1.WHAT.perl;
<p6eval> rakudo 6783b5: OUTPUT«Rat␤»
<sorear> rakudo: my $a; $a += 0.1; say $a.WHAT.perl;
<p6eval> rakudo 6783b5: OUTPUT«Num␤»
<sorear> masak bot, we need you
<sorear> Any + 0.1 is a Num
<sorear> bug
<jnthn> sorear: Interesting. :-/
<jnthn> sorear: I know why it happens.
<jnthn> Essentially we call back to Num if no candidates match.
<jnthn> Rat + Rat has a candidate
<jnthn> (other thing) + Rat doesn't
<jnthn> I guess we could go adding Any:U + Rat candidates.
<jnthn> But...hm. :-)
<masak> so the bug is that after the loop, $a is a Num and not a Rat?
<jnthn> masak: That's not the heart of it.
<sorear> masak: the bug is that adding a Rat to an Any protoobject gives a Num
<masak> rakudo: my $a; $a += 0.1; say $a.WHAT
<p6eval> rakudo 6783b5: OUTPUT«Num()␤»
<sorear> rakudo: my Rat $a; $a += 0.1; say $a.WHAT
<masak> so that's the bug?
<sorear> yes
* masak submits rakudobug
* jnthn would be interested to hear the langauge design angle on how
the bug should be fixed
<jnthn> I agree it's unintuitive.

Reply via email to