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 Int $a is default(Nil); say $a'
===SORRY!=== Error while compiling -e
Default value '(Any)' will never bind to a parameter of type Int
at -e:1
------> my Int $a is default(Nil)^; say $a
expecting any of:
constraint
The error message is correct that this is a bad default value for
the variable's type, but it is incorrect in identifying the value.
The failure mode looks very much like [perl #126091], which occurred in
a situation where Nil was a type constraint.
The correct default value Nil is now mentioned in the error message:
$ perl6-m -e 'my Int $a is default(Nil)'
===SORRY!=== Error while compiling -e
Default value 'Nil' will never bind to a parameter of type Int
at -e:1
------> my Int $a is default(Nil)⏏<EOL>
expecting any of:
constraint
Migrated from rt.perl.org#126105 (status was 'resolved')
Searchable as RT126105$
The text was updated successfully, but these errors were encountered: