Dotty Documentation

0.17.0-bin-SNAPSHOT

object NonLocalReturns
extends Object with Serializable

Library implementation of nonlocal return.

Usage:

import scala.util.control.NonLocalReturns._

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

[-] Constructors

[-] Members

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

Enable nonlocal returns in op.

[+] def throwReturn ( result: T ) ( implicit returner: ReturnThrowable [ T ] ) : Nothing

Performs a nonlocal return by throwing an exception.