This seems to have been fixed with commit
https://github.com/rakudo/rakudo/commit/d1c2e7649884a48a4733666c1425d8dcb4918120.
There were tests added at the same time, i.e.
https://github.com/perl6/roast/commit/e797f925515ac93f814fa34b6eef291a05fe8a46
but I'm unsure if those tests cover this RT. I
# New Ticket Created by Larry Wall
# Please include the string: [perl #126415]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126415 >
Using a normal closure works:
lucca:~/rc 1244> cat foo
my @isprime = False,False; # 0 an