It will work correctly. Apparently, the last element of the block is thrown into sink context which in this case means it's simply ignored; this trap is related to that. However, that code above looks perfectly fine; and this

{@total Z+= @^þ} for @bitfields;

apparently works, although I don't see the real difference. Any other idea?

The error message for the halfok: line is because the result of it is thrown away. But the do has forced the compiler to evaluate the $foo X= 'e' expression in the block, as it should, and as it had failed to in the notok: line.

{@total Z+= @^þ} for @bitfields;

Perhaps that's because that's the non-modifier version. And/or because it doesn't use the -> syntax (which is part of the regression or new bug per my golf above).

Or perhaps just luck. I think most of the sink handling code in Rakudo is Larry's work from long ago when he was trying to get things mostly working right.