So I looked at this, and at very best the proposed error message is wrong. It says that ? is useless when used with %%, but that's not the case:
<AlexDaniel> m: say ‘af’|‘a’|‘f’|‘’ ~~ /a? %% f/ <camelia> rakudo-moar 00af9ce27: OUTPUT: «「af」「a」「f」「」» <AlexDaniel> m: say ‘af’|‘a’|‘f’|‘’ ~~ /a?f?/ <camelia> rakudo-moar 00af9ce27: OUTPUT: «「af」「a」「f」「」» So yes, while in this case it is equivalent to just `a?f?`, it's not totally useless. And I think it makes sense to allow this behavior to have all quantifiers behaving consistently. And according to this discussion, that particular fix will not go in: https://irclog.perlgeek.de/perl6-dev/2018-02-11#i_15804761 On 2018-02-11 02:04:06, c...@zoffix.com wrote: > On Wed, 15 Jul 2015 07:31:55 -0700, lue wrote: > > <ShimmerFairy> m: say "ab" ~~ /^ a +% (b) $/ > > <camelia> rakudo-moar e4077e: OUTPUT«Nil» > > <ShimmerFairy> m: say "ab" ~~ /^ a *% (b) $/ > > <camelia> rakudo-moar e4077e: OUTPUT«Nil» > > <ShimmerFairy> m: say "ab" ~~ /^ a ?% (b) $/ > > <camelia> rakudo-moar e4077e: OUTPUT«===SORRY!===QAST::Block with > > cuid cuid_1_1436969557.11546 has not appeared» > > > > On JVM: > > > > <ShimmerFairy> j: say "ab" ~~ /^ a ?% (b) $/ > > <camelia> rakudo-jvm e4077e: OUTPUT«===SORRY!===setcodeobj can only > > be used with a CodeRef» > > > > And just to show that it's not just the ?% operator alone > > contributing > > to the issue, but the capture too: > > > > <ShimmerFairy> m: say "ab" ~~ /^ a ?% [b] $/ > > <camelia> rakudo-moar e4077e: OUTPUT«Nil» > > > Made potential fix in branches in > https://github.com/perl6/nqp/commit/ac3d5307f3 and > https://github.com/perl6/roast/commit/f2b07afbba > > The fix is to throw on `?`/`??` quantifiers used with `%`/`%%`. > > It's blocked by 2 lines of 6.c tests that indirectly use this > combination: > https://github.com/perl6/roast/commit/aaa71d077431cd0a86be84bd386e1032a12e8697#diff- > ae7b47444302486e790af6ee18121fabR16 > > I delegated it to the release manager whether to merge that stuff or > to require a fix that leaves these working and then we fix the > compilation error itself.