On Sun Apr 08 08:03:22 2012, spiderma...@free.fr wrote:
> With Rakudo 2012.03-53-g119fe3b (commit 
> 119fe3b5b85fe680aa1a7ea29042a5714e63a402), the following code fails:
> 
>     sub id(Any ::T $x) returns T {
>         $x
>     }
> 
>     say id 42;
> 
> with the following error message:
> 
>     Type check failed for return value
>       in sub id at testcase.pl:1
>       in block <anon> at testcase.pl:5
> 
> ::T correctly contains Int, though.

Current behavior:

$ cat a.pm
sub id(Any ::T $x) returns T {
    $x
}

say id 42;

$ ./perl6 a.pm
Cannot type check against type variable T
  in any type_check at src/gen/Metamodel.nqp:305
  in sub id at a.pm:2
  in block  at a.pm:5


-- 
Will "Coke" Coleda

Reply via email to