On Thu Jan 22 02:48:08 2009, masak wrote: > <moritz_> masak: can you submit the 'my Int $x = +"2"' bug please? > * masak submits > <masak> rakudo: my Int $x = +'2' > <p6eval> rakudo 35875: OUTPUT«Type mismatch in assignment. [...] > <jnthn> rakudo: say WHAT +"2"; > <p6eval> rakudo 35875: OUTPUT«Num» > <jnthn> meh. > <jnthn> That's why. > <moritz_> it should be a bit smarter > <masak> moritz_: + numifies. > <masak> it doesn't intify. > [...]
Just to keep the ticket up to date, there was more discussion about this at http://irclog.perlgeek.de/perl6/2009-02-28#i_946107 . This discussion led to a new "numish" rule added to STD.pm, and we expect that prefix:<+> for string types will be smart enough to choose Num or Int (and possibly Rat or Complex) based on the string it numifies. The details may need to be fleshed out a bit further, though. Pm