retains

scala.annotation.retains
class retains[Elems] extends StaticAnnotation

An annotation that indicates capture of a set of references under capture checking.

T @retains[x.type | y.type | z.type]

is the internal representation used for the capturing type

T ^ {x, y, z}

The annotation can also be written explicitly if one wants to avoid the non-standard capturing type syntax.

Attributes

Experimental
true
Source
retains.scala
Graph
Supertypes
class Annotation
class Object
trait Matchable
class Any
In this article