NonLocalReturns

Library implementation of nonlocal return.

Usage:

import scala.util.control.NonLocalReturns._

returning { ... throwReturn(x) ... }

Source
NonLocalReturns.scala
class Object
trait Matchable
class Any

Type members

Classlikes

Value members

Concrete methods

def returning[T](op: ReturnThrowable[T] => T): T

Enable nonlocal returns in op.

Enable nonlocal returns in op.

Source
NonLocalReturns.scala
def throwReturn[T](result: T)(using returner: ReturnThrowable[T]): Nothing

Performs a nonlocal return by throwing an exception.

Performs a nonlocal return by throwing an exception.

Source
NonLocalReturns.scala