NonLocalReturns
scala.util.control.NonLocalReturns
object NonLocalReturns
Library implementation of nonlocal return.
Usage:
import scala.util.control.NonLocalReturns.*
returning { ... throwReturn(x) ... }
This API has been deprecated. Its functionality is better served by
scala.util.boundary
in place ofreturning
scala.util.break
in place ofthrowReturn
The new abstractions work with plain RuntimeExceptions
and are more performant, since returns within the scope of the same method can be rewritten by the compiler to jumps.
Attributes
- Deprecated
- true
- Source
- NonLocalReturns.scala
- Graph
-
- Supertypes
- Self type
-
NonLocalReturns.type
Members list
In this article