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

Scala return actually throws NonLocalReturnControl[A] now #42

Open
zhenglaizhang opened this issue Dec 8, 2016 · 0 comments
Open

Scala return actually throws NonLocalReturnControl[A] now #42

zhenglaizhang opened this issue Dec 8, 2016 · 0 comments

Comments

@zhenglaizhang
Copy link

The section 2.1. MUST NOT use "return" states:

In Scala, a return statement inside a nested anonymous function is implemented by throwing and catching a NonLocalReturnException. It says so in the Scala Language Specification, section 6.20.

Actually the NonLocalReturnException was renamed as NonLocalReturnControl, and related content in the pdf is not up to date.

refs: https://issues.scala-lang.org/browse/SI-4862

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

No branches or pull requests

1 participant