Still reproducible (2017.11,HEAD(e5b660e))

I don't know if it's NYI or @LARRY. I'd put LARRY first, and then one of the
LARRYs can turn it into a NYI.

On 2015-08-05 15:25:57, barto...@gmx.de wrote:
> The relevant sentences from the design docs (S06, introduced with
> commit 7846594ee4):
>
> "Since this option [is rw] forces an argument to be required, it
> cannot coexist with the ? mark to make an argument optional. (It may,
> however, be used with = indicating a default, but only if the default
> expression represents something that is nameable at compile time and
> that can bind as an lvalue, such as CALLER::<$/> or OUTER::<$_>.)"
>
> AFAIU the default value in question (= 60) does not qualify as a valid
> "is rw"-able expression according to S06.
>
> Rakudo makes no difference between parameters made optional with the ?
> mark or those made optional by providing a default value and simply
> disallows 'is rw' (introduced with commit 45c44bafbf), e.g.:
>
> $ perl6 -e 'sub f($x is rw = OUTER::<$_>) {$x++; say $x}; $_ = 41; f'
> ===SORRY!=== Error while compiling -e
> Cannot use 'is rw' on an optional parameter
> at -e:1

Reply via email to