I don't think you can avoid that, but I'm not completely certain.
You might have to remove the pushmark along with the return. When you do that, you get exactly the same opcode tree as if you hadn't used the return keyword, so it's obviously safe.
In reply to Re^2: Why isn't return removed from optree?
by ikegami
in thread Why isn't return removed from optree?
by ikegami
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |