Covariant
Covariant: +A Preserves subtyping: if Dog <: Animal, then F[Dog] <: F[Animal]
Attributes
- Source
- Variance.scala
- Graph
-
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait Varianceclass Objecttrait Matchableclass AnyShow all
- Self type
-
Covariant.type
Members list
Type members
Inherited types
The names of the product elements.
Attributes
- Inherited from:
- Singleton
- Source
- Mirror.scala
The mirrored *-type.
Attributes
- Inherited from:
- Singleton
- Source
- Mirror.scala
Inherited and Abstract types
The name of the type.
Value members
Inherited methods
Combines two variances. Used when a type parameter appears in a nested position.
Combines two variances. Used when a type parameter appears in a nested position.
Attributes
- Inherited from:
- Variance
- Source
- Variance.scala
Flips the variance (covariant contravariant, invariant stays).
Flips the variance (covariant contravariant, invariant stays).
Attributes
- Inherited from:
- Variance
- Source
- Variance.scala
Creates a new instance of type T with elements taken from product p.
Creates a new instance of type T with elements taken from product p.
Attributes
- Inherited from:
- Singleton
- Source
- Mirror.scala
Returns true if this is contravariant.
Returns true if this is covariant.
Returns true if this is invariant.
An iterator over the names of all the elements of this product.
An iterator over the names of all the elements of this product.
Attributes
- Inherited from:
- Product
- Source
- Product.scala
An iterator over all the elements of this product.
An iterator over all the elements of this product.
Attributes
- Returns
-
in the default implementation, an
Iterator[Any] - Inherited from:
- Product
- Source
- Product.scala
Returns the Scala syntax for this variance annotation.
Returns the Scala syntax for this variance annotation.
Attributes
- Inherited from:
- Variance
- Source
- Variance.scala