Dotty Documentation

0.6.0-bin-SNAPSHOT

object Types
extends Object

[-] Constructors

[-] Members

[+] trait AndOrType
[+] abstract case class AndType
[+] object AndType
[+] case class AnnotatedType

An annotated type tpe @ annot

[+] object AnnotatedType
[+] abstract case class AppliedType

A type application C[T_1, ..., T_n]

[+] object AppliedType
[+] abstract class ApproximatingTypeMap

A type map that approximates TypeBounds types depending on variance.

if variance > 0 : approximate by upper bound variance < 0 : approximate by lower bound variance = 0 : propagate bounds to next outer level

[+] trait BindingType

A marker trait for types that bind other types that refer to them. Instances are: LambdaType, RecType.

[+] abstract class BoundType
[+] final class CachedAndType
[+] final class CachedAppliedType
[+] class CachedClassInfo
[+] final class CachedConstantType
[+] final class CachedExprType
[+] abstract class CachedGroundType

Instances of this class are cached and are not proxies.

[+] final class CachedJavaArrayType
[+] final class CachedMethodType
[+] final class CachedOrType
[+] abstract class CachedProxyType

Instances of this class are cached and are proxies.

[+] class CachedRefinedType
[+] final class CachedSuperType
[+] final class CachedTermRef
[+] final class CachedThisType
[+] trait CachedType

A marker trait for cached types

[+] class CachedTypeAlias
[+] final class CachedTypeRef
[+] final class CachedWildcardType
[+] abstract case class ClassInfo

Roughly: the info of a class during a period.

[+] object ClassInfo
[+] abstract case class ConstantType

A constant type with single value.

[+] object ConstantType
[+] class CyclicReference
[+] object CyclicReference
[+] abstract class DeepTypeMap

A type map that maps also parents and self type of a ClassInfo

[+] private object DepStatus
[+] abstract class ErrorType
[+] object ErrorType
[+] class ExistsAccumulator
[+] object ExistsAccumulator
[+] abstract case class ExprType

A by-name parameter type of the form => T, or the type of a method with no parameter list.

[+] object ExprType
[+] abstract class FlexType

A common superclass of ErrorType and TryDynamicCallSite. Instances of this class are at the same time subtypes and supertypes of every other type.

[+] class ForeachAccumulator
[+] abstract class HKLambda
[+] class HKTypeLambda

A type lambda of the form [X_0 B_0, ..., X_n B_n] => T Variances are encoded in parameter names. A name starting with + designates a covariant parameter, a name starting with - designates a contravariant parameter, and every other name designates a non-variant parameter.

[+] object HKTypeLambda
[+] @sharable object IdentityTypeMap
[+] object ImplicitMethodType
[+] trait ImplicitRef

A reference to an implicit definition. This can be either a TermRef or a Implicits.RenamedImplicitRef.

[+] case class ImportType

The type of an import clause tree

[+] object ImportType

The type of an import clause tree

[+] abstract case class JavaArrayType

The type of an erased array

[+] object JavaArrayType
[+] object JavaMethodType
[+] case class LambdaParam

The parameter of a type lambda

[+] object LambdaParam

The parameter of a type lambda

[+] trait LambdaType

The lambda type square:

LambdaType | TermLambda | TypeLambda -------------+-------------------+------------------ HKLambda | HKTermLambda | HKTypeLambda MethodOrPoly | MethodType | PolyType

[+] abstract class LambdaTypeCompanion
[+] case class LazyRef
[+] object LazyRef
[+] class MalformedType
[+] class MergeError
[+] trait MethodOrPoly
[+] object MethodTpe

A ternary extractor for MethodType

[+] abstract case class MethodType
[+] object MethodType
[+] abstract class MethodTypeCompanion
[+] trait MethodicType

A trait that mixes in functionality for signature caching

[+] class MissingType
[+] abstract class NameFilter

A name filter selects or discards a member name of a type pre. To enable efficient caching, name filters have to satisfy the following invariant: If keep is a name filter, and pre has class C as a base class, then

keep(pre, name) implies keep(C.this, name)

[+] abstract class NamedType
[+] object NamedType
[+] trait NarrowCached

Implementations of this trait cache the results of narrow.

[+] @sharable object NoPrefix

Missing prefix

[+] @sharable object NoType

Sentinel for "missing type"

[+] abstract case class OrType
[+] object OrType
[+] abstract class ParamRef
[+] class PolyType

The type of a polymorphic method. It has the same form as HKTypeLambda, except it applies to terms and parameters do not have variances.

[+] object PolyType
[+] trait ProtoType

A trait for proto-types, used as expected types in typer

[+] private case class Range

A range of possible types between lower bound lo and upper bound hi. Only used internally in ApproximatingTypeMap.

[+] private object Range

A range of possible types between lower bound lo and upper bound hi. Only used internally in ApproximatingTypeMap.

[+] class RealTypeBounds
[+] abstract case class RecThis

a self-reference to an enclosing recursive type. The only creation method is binder.recThis, returning RecThis(binder).

[+] object RecThis

a self-reference to an enclosing recursive type. The only creation method is binder.recThis, returning RecThis(binder).

[+] class RecType
[+] object RecType
[+] abstract class RefinedOrRecType
[+] abstract case class RefinedType

A refined type parent { refinement }

[+] object RefinedType
[+] object SAMType

An extractor for single abstract method types. A type is a SAM type if it is a reference to a class or trait, which

  • has a single abstract method with a method type (ExprType and PolyType not allowed!)
  • can be instantiated without arguments or with just () as argument.

The pattern SAMType(denot) matches a SAM type, where denot is the denotation of the single abstract method as a member of the type.

[+] trait SingletonType

A marker trait for types that are guaranteed to contain only a single non-null value (they might contain null in addition).

[+] case class SkolemType

A skolem type reference with underlying type binder.

[+] object SkolemType

A skolem type reference with underlying type binder.

[+] abstract case class SuperType

The type of a super reference cls.super where thistpe is cls.this and supertpe is the type of the value referenced by super.

[+] object SuperType
[+] final class TempClassInfo

A class for temporary class infos where parents are not yet known

[+] trait TermLambda
[+] abstract class TermLambdaCompanion
[+] abstract case class TermParamRef

Only created in binder.paramRefs. Use binder.paramRefs(paramNum) to refer to TermParamRef(binder, paramNum).

[+] object TermParamRef

Only created in binder.paramRefs. Use binder.paramRefs(paramNum) to refer to TermParamRef(binder, paramNum).

[+] abstract case class TermRef
[+] object TermRef
[+] trait TermType

A marker trait for types that apply only to term symbols or that represent higher-kinded types.

[+] abstract case class ThisType

The type cls.this

[+] object ThisType
[+] object TryDynamicCallType
[+] abstract class Type

Main class representing types.

The principal subclasses and sub-objects are as follows:

Type -+- ProxyType --+- NamedType ----+--- TypeRef
      |              |                 \
      |              +- SingletonType-+-+- TermRef
      |              |                |
      |              |                +--- ThisType
      |              |                +--- SuperType
      |              |                +--- ConstantType
      |              |                +--- TermParamRef
      |              |                +----RecThis
      |              |                +--- SkolemType
      |              +- TypeParamRef
      |              +- RefinedOrRecType -+-- RefinedType
      |              |                   -+-- RecType
      |              +- AppliedType
      |              +- TypeBounds
      |              +- ExprType
      |              +- AnnotatedType
      |              +- TypeVar
      |              +- HKTypeLambda
      |
      +- GroundType -+- AndType
                     +- OrType
                     +- MethodOrPoly ---+-- PolyType
                                        +-- MethodType ---+- ImplicitMethodType
                     |                                    +- JavaMethodType
                     +- ClassInfo
                     |
                     +- NoType
                     +- NoPrefix
                     +- ErrorType
                     +- WildcardType

Note: please keep in sync with copy in docs/docs/internals/type-system.md.

[+] abstract class TypeAccumulator
[+] abstract class TypeAlias
[+] object TypeAlias
[+] abstract case class TypeBounds

Type bounds >: lo <: hi

[+] object TypeBounds
[+] class TypeError
[+] trait TypeLambda
[+] abstract class TypeLambdaCompanion
[+] abstract class TypeMap
[+] abstract case class TypeParamRef

Only created in binder.paramRefs. Use binder.paramRefs(paramNum) to refer to TypeParamRef(binder, paramNum).

[+] object TypeParamRef

Only created in binder.paramRefs. Use binder.paramRefs(paramNum) to refer to TypeParamRef(binder, paramNum).

[+] abstract class TypeProxy

A marker trait for type proxies. Each implementation is expected to redefine the underlying method.

[+] abstract case class TypeRef
[+] object TypeRef
[+] abstract class TypeTraverser
[+] trait TypeType

A marker trait for types that apply only to type symbols

[+] final class TypeVar

In a TypeApply tree, a TypeVar is created for each argument type to be inferred. Every type variable is referred to by exactly one inferred type parameter of some TypeApply tree.

A type variable is essentially a switch that models some part of a substitution. It is first linked to origin, a poly param that's in the current constraint set. It can then be (once) instantiated to some other type. The instantiation is recorded in the type variable itself, or else, if the current type state is different from the variable's creation state (meaning unrolls are possible) in the current typer state.

[+] abstract class UncachedGroundType

Instances of this class are uncached and are not proxies.

[+] abstract class UncachedProxyType

Instances of this class are uncached and are proxies.

[+] trait ValueType

A marker trait for types that can be types of values or that are higher-kinded

[+] trait ValueTypeOrProto

A marker trait for types that can be types of values or prototypes of value types

A marker trait for types that can be types of values or wildcards

[+] abstract class VariantTraversal

Common base class of TypeMap and TypeAccumulator

[+] abstract case class WildcardType

Wildcard type, possibly with bounds

[+] @sharable object WildcardType

A filter for names of deferred term definitions of a given type

A filter for names of abstract types of a given type

[+] object fieldFilter
[+] object implicitFilter

A filter for names of abstract types of a given type

[+] object takeAllFilter
[+] object typeAliasNameFilter

A filter for names of type aliases of a given type

[+] object typeNameFilter
[+] type TypeOrSymbol = AnyRef
[+] @sharable var debugTrace : Boolean
[+] @sharable private var nextId : Int
[+] val watchList : List [ TypeName ]
[+] private def assertUnerased ( ) ( implicit ctx: Context ) : Unit

Assert current phase does not have erasure semantics

[+] @sharable def debugTrace_= ( x$1: Boolean ) : Unit
[+] implicit def decorateTypeApplications ( tpe: Type ) : TypeApplications
[+] implicit def eqType : Eq [ Type, Type ]
[+] def isWatched ( tp: Type ) ( implicit ctx: Context ) : Boolean
[+] private def otherReason ( pre: Type ) ( implicit ctx: Context ) : String