> On 13 Sep 2015, at 10:13, Tobias Leich (via RT) 
> <perl6-bugs-follo...@perl.org> wrote:
> 
> # New Ticket Created by  Tobias Leich 
> # Please include the string:  [perl #126047]
> # in the subject line of all future correspondence about this issue. 
> # <URL: https://rt.perl.org/Ticket/Display.html?id=126047 >
> 
> 
> m: sub foo(Int(IntStr:D) $a) { say $a.WHAT }; foo <42>
> rakudo-moar 77cf27: OUTPUT«(IntStr)␤»
> 
> I expect that this outputs (Int).

FWIW, I have been bitten by this before.  But I think it is ENOTABUG, as IntStr 
isa Int, so no coercion will take place  (at least, that’s what jnthn said when 
I ran into this).

I feel that maybe we need to revisit this, if the receiving type is a subclass 
of the coercing type.

OTOH, maybe we should not check types at all an just coerce ?


Liz

Reply via email to