scala

package scala

Members list

Packages

package scala.deriving
package scala.quoted
package scala.reflect
package scala.runtime
package scala.util

Type members

Classlikes

sealed abstract class *:[+H, +T <: Tuple] extends NonEmptyTuple

Attributes

Companion
object
Source
Tuple.scala
Supertypes
trait Tuple
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object *:

Attributes

Companion
class
Source
Tuple.scala
Supertypes
class Object
trait Matchable
class Any
Self type
*:.type
sealed trait CanEqual[-L, -R]

A marker trait indicating that values of type L can be compared to values of type R.

A marker trait indicating that values of type L can be compared to values of type R.

Attributes

Companion
object
Source
CanEqual.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object derived.type
object CanEqual

Companion object containing a few universally known CanEqual instances. CanEqual instances involving primitive types or the Null type are handled directly in the compiler (see Implicits.synthesizedCanEqual), so they are not included here.

Companion object containing a few universally known CanEqual instances. CanEqual instances involving primitive types or the Null type are handled directly in the compiler (see Implicits.synthesizedCanEqual), so they are not included here.

Attributes

Companion
trait
Source
CanEqual.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
CanEqual.type
abstract class Conversion[-T, +U] extends T => U

A class for implicit values that can serve as implicit conversions. The implicit resolution algorithm will act as if there existed the additional implicit definition:

A class for implicit values that can serve as implicit conversions. The implicit resolution algorithm will act as if there existed the additional implicit definition:

def $implicitConversion[T, U](x: T)(c: Conversion[T, U]): U = c(x)

However, the presence of this definition would slow down implicit search since its outermost type matches any pair of types. Therefore, implicit search contains a special case in Implicits#discardForView which emulates the conversion in a more efficient way.

Note that this is a SAM class - function literals are automatically converted to the Conversion values.

Also note that in bootstrapped dotty, Predef.<:< should inherit from Conversion. This would cut the number of special cases in discardForView from two to one.

The Conversion class can also be used to convert explicitly, using the convert extension method.

Attributes

Source
Conversion.scala
Supertypes
trait T => U
class Object
trait Matchable
class Any
case object EmptyTuple extends Tuple

A tuple of 0 elements.

A tuple of 0 elements.

Attributes

Source
Tuple.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Tuple
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
EmptyTuple.type
object IArray

An immutable array. An IArray[T] has the same representation as an Array[T], but it cannot be updated. Unlike regular arrays, immutable arrays are covariant.

An immutable array. An IArray[T] has the same representation as an Array[T], but it cannot be updated. Unlike regular arrays, immutable arrays are covariant.

Attributes

Source
IArray.scala
Supertypes
class Object
trait Matchable
class Any
Self type
IArray.type
sealed trait NonEmptyTuple extends Tuple

Tuple of arbitrary non-zero arity

Tuple of arbitrary non-zero arity

Attributes

Source
Tuple.scala
Supertypes
trait Tuple
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
class H *: T
trait PolyFunction

Marker trait for polymorphic function types.

Marker trait for polymorphic function types.

This is the only trait that can be refined with a polymorphic method, as long as that method is called apply, e.g.: PolyFunction { def apply[T_1, ..., T_M](x_1: P_1, ..., x_N: P_N): R } This type will be erased to FunctionN.

Attributes

Source
PolyFunction.scala
Supertypes
class Object
trait Matchable
class Any
trait Selectable

A marker trait for objects that support structural selection via selectDynamic and applyDynamic

A marker trait for objects that support structural selection via selectDynamic and applyDynamic

Implementation classes should define, or make available as extension methods, the following two method signatures:

  def selectDynamic(name: String): Any
  def applyDynamic(name: String)(args: Any*): Any =

selectDynamic is invoked for simple selections v.m, whereas applyDynamic is invoked for selections with arguments v.m(...). If there's only one kind of selection, the method supporting the other may be omitted. The applyDynamic can also have a second parameter list of java.lang.Class arguments, i.e. it may alternatively have the signature

  def applyDynamic(name: String, paramClasses: Class[_]*)(args: Any*): Any

In this case the call will synthesize Class arguments for the erasure of all formal parameter types of the method in the structural type.

Attributes

Companion
object
Source
Selectable.scala
Supertypes
class Any
Known subtypes
object Selectable

Attributes

Companion
trait
Source
Selectable.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Selectable.type
sealed trait Tuple extends Product

Tuple of arbitrary arity

Tuple of arbitrary arity

Attributes

Companion
object
Source
Tuple.scala
Supertypes
trait Product
trait Equals
class Object
trait Matchable
class Any
Known subtypes
object EmptyTuple.type
class H *: T
object Tuple

Attributes

Companion
trait
Source
Tuple.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Tuple.type
class main extends Annotation

An annotation that designates a main function

An annotation that designates a main function

Attributes

Source
main.scala
Supertypes
class Annotation
class Object
trait Matchable
class Any

Experimental classlikes

erased class CanThrow[-E <: Exception]

A capability class that allows to throw exception E. When used with the experimental.saferExceptions feature, a throw Ex() expression will require a given of class CanThrow[Ex] to be available.

A capability class that allows to throw exception E. When used with the experimental.saferExceptions feature, a throw Ex() expression will require a given of class CanThrow[Ex] to be available.

Attributes

Experimental
true
Source
CanThrow.scala
Supertypes
class Object
trait Matchable
class Any
object caps

Attributes

Experimental
true
Source
caps.scala
Supertypes
class Object
trait Matchable
class Any
Self type
caps.type

Attributes

Experimental
true
Source
CanThrow.scala
Supertypes
class Object
trait Matchable
class Any
Self type

Types

type EmptyTuple = EmptyTuple.type

A tuple of 0 elements

A tuple of 0 elements

Attributes

Source
Tuple.scala
opaque type IArray[+T]

Attributes

Source
IArray.scala