Feels to me that Nil should not be allowed as a type constraint at all.

> On 27 Feb 2017, at 09:11, Zefram (via RT) <perl6-bugs-follo...@perl.org> 
> wrote:
> 
> # New Ticket Created by  Zefram 
> # Please include the string:  [perl #130875]
> # in the subject line of all future correspondence about this issue. 
> # <URL: https://rt.perl.org/Ticket/Display.html?id=130875 >
> 
> 
>> my Int $a of Nil
> ===SORRY!=== Error while compiling:
> Mu not allowed here; variable list already declared with type Int
> at line 2
> ------> <BOL>^<EOL>
>    expecting any of:
>        constraint
>> my Nil $a of Int
> ===SORRY!=== Error while compiling:
> Int not allowed here; variable list already declared with type Mu
> at line 2
> ------> <BOL>^<EOL>
>    expecting any of:
>        constraint
> 
> In both of these cases of multiple type constraints, the Nil type
> constraint is incorrectly described as "Mu".  The same problem
> also occurs if both type constraints are specified in the "of" form.
> The error messages are otherwise correct, and the corresponding messages
> for other types are correct.  A Nil type constraint specified without
> a clash actually behaves (mostly correctly) as a Nil type constraint,
> not as a Mu type constraint.
> 
> -zefram

Reply via email to