You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ ./perl6 -e 'my $a of Int is default("foo")'
===SORRY!=== Error while compiling -e
Default value 'foo' will never bind to a parameter of type Any
at -e:1
------> my $a of Int is default("foo")^<EOL>
expecting any of:
constraint
The error message is correct that the specified default value doesn't
satisfy the type constraint, but it is incorrect in identifying the type.
The message looks nonsensical, because the value that it shows does
match the type that it states.
This fault doesn't occur if the type constraint is specified as "my
Int $a".
Migrated from rt.perl.org#126108 (status was 'resolved')
Searchable as RT126108$
The text was updated successfully, but these errors were encountered: