I should also mention that while this form produces the bug:
regex foo { <word> { say($<word>) } }
This form does not:
$s ~~ /<word> { say($<word>) } }/
I should also mention that while this form produces the bug:
regex foo { <word> { say($<word>) } }
This form does not:
$s ~~ /<word> { say($<word>) } }/