This is actually a regression.
Code:
$ = ""; sub postfix:<♥> { $^a + 42}; say "{ 5♥ }"
¦«2015.12»:
47
¦«2016.06»:
47
¦«2016.12»:
47
¦«2017.06»:
===SORRY!=== Error while compiling
/home/bisectable/git/whateverable/data/regressionable/15285677/snippet
Bogus postfix
at /home/bisectable/git/whateverable/data/regressionable/15285677/snippet:1
--> "; sub postfix:<♥> { $^a + 42}; say "{ 5⏏♥ }"
expecting any of:
infix
infix stopper
statement end
statement modifier
statement modifier loop «exit code = 1»
¦«HEAD»:
===SORRY!=== Error while compiling
/home/bisectable/git/whateverable/data/regressionable/15285677/snippet
Bogus postfix
at /home/bisectable/git/whateverable/data/regressionable/15285677/snippet:1
--> "; sub postfix:<♥> { $^a + 42}; say "{ 5⏏♥ }"
expecting any of:
infix
infix stopper
statement end
statement modifier
statement modifier loop «exit code = 1»
Possible IRC discussion:
https://irclog.perlgeek.de/perl6-dev/2017-10-10#i_15285677
Bisectable points at 25 possible candidates:
https://gist.github.com/Whateverable/1510af516a727e3d09d1e19b39123f0e
There's some stuff about braids in these commits so maybe some inspiration can
be taken from there.
On 2017-10-10 11:30:50, c...@zoffix.com wrote:
> If you enter the Quote braid, then define a new op, and then try to
> use it in a block within quotes, it fails to find the routine:
>
> 18:29 m: ""; sub postfix:($) {}; "{ 5! }";
> 18:29 camelia rakudo-moar e13512: OUTPUT: «5===SORRY!5===
> Error while compiling Negation metaoperator not followed by
> valid infixat :1--> 3""; sub postfix:($) {}; "{ 5!7⏏5
> }"; expecting any of: infix infix stopper»
>
> But if you move the first quotes past the sub, then it works:
>
> 18:29 Zoffix m: sub postfix:($) {}; ""; "{ 5! }";
> 18:29 camelia rakudo-moar e13512: OUTPUT: «WARNINGS for
> :Useless use of constant string "" in sink context (line 1)Use
> of Nil in string context in block at line 1»
>
> IRC: https://irclog.perlgeek.de/perl6/2017-10-10#i_15284813