From 47d08992aee08eab680f484ccc71b1c6e6088abf Mon Sep 17 00:00:00 2001 From: Steven Heidel Date: Sat, 15 Jun 2019 10:49:01 -0700 Subject: [PATCH] Correct misspelling in nonlocal returns --- docs/docs/reference/dropped-features/nonlocal-returns.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/reference/dropped-features/nonlocal-returns.md b/docs/docs/reference/dropped-features/nonlocal-returns.md index ef123cb090a1..075eef088f75 100644 --- a/docs/docs/reference/dropped-features/nonlocal-returns.md +++ b/docs/docs/reference/dropped-features/nonlocal-returns.md @@ -3,7 +3,7 @@ layout: doc-page title: Deprecated: Nonlocal Returns --- -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`. +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`. A drop-in library replacement is provided in `scala.util.control.NonLocalReturns`: