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

Coverage: try/catch/finally completion values. Fixes gh-1742 #2792

Merged
merged 3 commits into from Sep 18, 2020

Conversation

rwaldron
Copy link
Contributor

No description provided.

@rwaldron
Copy link
Contributor Author

@syg heads up for failures in V8—these might be unexpected.

@leobalter
Copy link
Member

@leobalter
Copy link
Member

@rwaldron After battle testing this PR, I took the liberty to fix the eval tests and add some others involving return completions.

There is still a chance to add tests for try-catch-finally messing up returns using break or continue, lol.

function fn() {
  do {
    try {
      return 'NOT ME';
    } catch {}
    finally {
      break;
    }
  } while (false);
  return 42;
}

fn(); // 42;

…pt.js

Co-authored-by: Kevin Gibbons <bakkot@gmail.com>
@rwaldron
Copy link
Contributor Author

@bakkot nice catch!

@rwaldron rwaldron merged commit 5565211 into main Sep 18, 2020
@rwaldron rwaldron deleted the try-catch-finally-eval branch September 18, 2020 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants