-
Notifications
You must be signed in to change notification settings - Fork 591
Open
Description
Description
do { defer { ... } }
doesn't run the deferred block at the end of the do
block, but at the end of the block enclosing the do
block.
Steps to Reproduce
This says "second" then "first".
use v5.36;
use experimental 'defer';
do {
defer { say "first" };
};
say "second";
Expected behavior
This says "first" then "second". (Which is expected!)
use v5.36;
use experimental 'defer';
{
defer { say "first" };
};
say "second";
(Note that the same bug is seen in Syntax::Keyword::Defer!)
Metadata
Metadata
Assignees
Labels
No labels