[perl #111964] [BUG] LTA error message when passing an Int argument to base conversion in Rakudo

2014-10-02 Thread Christian Bartolomaeus via RT
The error message now hopefully is adequat:

 my $x=31; say :8($x)
You have confused the number 31 with the textual representation 31;
if you wanted to render the number in the given base, use $number.base($radix)
  in block unit at unknown file:1

There is a test for the correct exception type (X::Numeric::Confused) in 
S02-literals/radix.t 


[perl #111964] [BUG] LTA error message when passing an Int argument to base conversion in Rakudo

2012-03-24 Thread Carl Mäsak
# New Ticket Created by  Carl Mäsak 
# Please include the string:  [perl #111964]
# in the subject line of all future correspondence about this issue. 
# URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=111964 


masak p6: my $x = 31; say :8($x)
p6eval pugs: OUTPUT«25␤»
p6eval ..niecza v15-6-gefda208: OUTPUT«Unhandled exception: Numbers
may not be passed :base(); if you wanted to render the number in the
given base, use $number.base($radix); if you want to treat the number
as a string, explicitly coerce it first [...]
p6eval ..rakudo a4c78f: OUTPUT«Nominal type check failed for
parameter '$str'; expected Str but got Int instead [...]
* masak submits LTA rakudobug

I'd say the Niecza error pretty much nails it here.