All of these were fixed (2017.11,HEAD(e5b660e)).

Strings give compile-time errors, putting Any into something results in an Int.
Curious minds can ask bisectable for details.

「testneeded」

On 2015-09-20 17:26:00, zef...@fysh.org wrote:
> Extended case: if the "of" clause comes after an "is default" clause,
> then the explicit default is not subjected to the type constraint.
> Other behaviour remains the same.
>
> $ ./perl6 -e 'my $a is default("foo") of Int; say $a'
> foo
> $ ./perl6 -e 'my $a is default("foo") of Int; $a = $a; say $a'
> Type check failed in assignment to '$a'; expected 'Int' but got 'Str'
> in block <unit> at -e:1
> $ ./perl6 -e 'my $a is default("foo") of Int; $a = 3; say $a; $a =
> Nil; say $a'
> 3
> foo
>
> -zefram

Reply via email to