To me, that’s ENOTABUG, because that’s exactly what fail / Failure is supposed 
to do.  Only when you actually *use* the value unprotected, will it throw.


# protected usage
$ 6 'my $i = "a".Int; say $i // 42’
42

# unprotected usage
$ 6 'my $i = "a".Int; say $i'
Cannot convert string to number: base-10 number must begin with valid digits or 
'.' in '⏏a' (indicated by ⏏)

The commit fixes behaviour.

> On 30 Dec 2016, at 02:59, Aleks-Daniel Jakimenko-Aleksejev (via RT) 
> <perl6-bugs-follo...@perl.org> wrote:
> 
> # New Ticket Created by  Aleks-Daniel Jakimenko-Aleksejev 
> # Please include the string:  [perl #130450]
> # in the subject line of all future correspondence about this issue. 
> # <URL: https://rt.perl.org/Ticket/Display.html?id=130450 >
> 
> 
> Code:
> my $i = 'a'.Int
> 
> 
> Result (2015.12, 2016.03):
> Cannot convert string to number: base-10 number must begin with valid digits 
> or '.' in '⏏a' (indicated by ⏏)
>  in block <unit> at /tmp/2R0qtbz9ME line 1
> 
> Actually thrown at:
>  in block <unit> at /tmp/2R0qtbz9ME line 1
> «exit code = 1»
> 
> 
> Result (HEAD):
> (Failure)
> 
> 
> So instead of throwing it just gives a Failure object.
> 
> Bisectable points to 
> https://github.com/rakudo/rakudo/commit/1cb2e8d9e71797f576b3ffc01129a196e30a9bad
> 
> I find the current behavior a bit surprising, but feel free to argue with 
> that.

Reply via email to