On Fri Jan 13 04:54:34 2012, [email protected] wrote:
> > New spec change says this:
> >
> >
> https://github.com/perl6/specs/commit/44511d749bbbae4286dd1675ad6264c72acd2433
> > ] Since this option forces an argument to be required,
> > ] it cannot co-exist with any marks that indicate an optional
> > parameter,
> > ] such as C<?> or a default value.
> >
> > Repurposing this ticket to be about that.
> >
> > $ perl6 -e 'sub foo($x? is rw) {}; foo(); say "alive"'
> > alive
> >
> > Should die at compile time.
> 
> Now it does:
> 
> ===SORRY!===
> Cannot use 'is rw' on an optional parameter
> 
> Tagging testneeded.
> 
> /jnthn

Still dies at compile time (as expected):

$ perl6 -e 'sub foo($x? is rw) {}'
===SORRY!=== Error while compiling -e
Cannot use 'is rw' on an optional parameter
at -e:1
------>

$ perl6 -e 'sub foo($x is rw = 4) {}'
===SORRY!=== Error while compiling -e
Cannot use 'is rw' on an optional parameter
at -e:1
------> 

I added two tests to S06-signature/optional.t with commit 
https://github.com/perl6/roast/commit/1014935495

I'm closing this ticket now.

Reply via email to