Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nesting LEAVE and ENTER phasers says "Cannot reference undeclared local 'enter_result__1" #5724

Closed
p6rt opened this issue Oct 3, 2016 · 4 comments
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Oct 3, 2016

Migrated from rt.perl.org#129801 (status was 'resolved')

Searchable as RT129801$

@p6rt
Copy link
Author

p6rt commented Oct 3, 2016

From @smls

I tried to time a subroutine as follows​:

  ➜ sub a { LEAVE say now - ENTER now; sleep 1 };
  ➜ a
  ===SORRY!===
  Cannot reference undeclared local 'enter_result__1

Not sure if nesting phasers like this would be reasonable to support,
but even if not, the error message should explain what's going on in
user-friendly terms and not leak an internal variable name.

@p6rt
Copy link
Author

p6rt commented Jan 30, 2018

From @zoffixznet

On Mon, 03 Oct 2016 11​:59​:18 -0700, smls75@​gmail.com wrote​:

I tried to time a subroutine as follows​:

➜  sub a \{ LEAVE say now \- ENTER now;  sleep 1 \};
➜  a
===SORRY\!===
Cannot reference undeclared local 'enter\_result\_\_1

Not sure if nesting phasers like this would be reasonable to support,
but even if not, the error message should explain what's going on in
user-friendly terms and not leak an internal variable name.

Thank you for the report. This is now fixed.

Fix​: rakudo/rakudo@58de239cc90bb3a
Test​: Raku/roast@8e4f5edff7b879f9f

@p6rt
Copy link
Author

p6rt commented Jan 30, 2018

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jan 30, 2018

@zoffixznet - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Jan 30, 2018
@p6rt p6rt added the LTA Less Than Awesome; typically an error message that could be better label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

1 participant