Skip to content

Commit dc62333

Browse files
Merge pull request #6691 from stevenheidel/patch-2
Correct misspelling in nonlocal returns
2 parents db3ab9e + 47d0899 commit dc62333

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/docs/reference/dropped-features/nonlocal-returns.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: doc-page
33
title: Deprecated: Nonlocal Returns
44
---
55

6-
Returning from nested anonymous functions has been deprecated. Nonlocal returns are implemented by throwing and catching `scala.runtime.NonLocalReturnException`-s. This is rarely what is intendant by the programmer. It can be problematic because of the hidden performance cost of throwing and catching exceptions. Furthermore, it is a leaky implementation: a catch-all exception handler can intercept a `NonLocalReturnException`.
6+
Returning from nested anonymous functions has been deprecated. Nonlocal returns are implemented by throwing and catching `scala.runtime.NonLocalReturnException`-s. This is rarely what is intended by the programmer. It can be problematic because of the hidden performance cost of throwing and catching exceptions. Furthermore, it is a leaky implementation: a catch-all exception handler can intercept a `NonLocalReturnException`.
77

88
A drop-in library replacement is provided in `scala.util.control.NonLocalReturns`:
99

0 commit comments

Comments
 (0)