TypeUtils

dotty.tools.dotc.core.TypeUtils
class TypeUtils

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Types

Members list

Extensions

Extensions

extension (self: Type)

A decorator that provides methods on types that are needed in the transformer pipeline.

A decorator that provides methods on types that are needed in the transformer pipeline.

Attributes

If this is a generic tuple with element types, compare the arity and return:

If this is a generic tuple with element types, compare the arity and return:

  • -1, if the generic tuple is small (<= MaxTupleArity)
  • 1, if the generic tuple is large (> MaxTupleArity)
  • 0 if this isn't a generic tuple with element types

Attributes

A decorator that provides methods on types that are needed in the transformer pipeline.

A decorator that provides methods on types that are needed in the transformer pipeline.

Attributes

Is this type a checked exception? This is the case if the type derives from Exception but not from RuntimeException. According to that definition Throwable is unchecked. That makes sense since you should neither throw nor catch Throwable anyway, so we should not define a capability to do so.

Is this type a checked exception? This is the case if the type derives from Exception but not from RuntimeException. According to that definition Throwable is unchecked. That makes sense since you should neither throw nor catch Throwable anyway, so we should not define a capability to do so.

Attributes

A decorator that provides methods on types that are needed in the transformer pipeline.

A decorator that provides methods on types that are needed in the transformer pipeline.

Attributes

A decorator that provides methods on types that are needed in the transformer pipeline.

A decorator that provides methods on types that are needed in the transformer pipeline.

Attributes

Is this a generic tuple but not already an instance of one of Tuple1..22?

Is this a generic tuple but not already an instance of one of Tuple1..22?

Attributes

Is this a generic tuple with an arity above 22?

Is this a generic tuple with an arity above 22?

Attributes

A decorator that provides methods on types that are needed in the transformer pipeline.

A decorator that provides methods on types that are needed in the transformer pipeline.

Attributes

Is this a generic tuple that would fit into the range 1..22? In this case we need to cast it to make the TupleN members accessible. This works only for generic tuples of known size up to 22.

Is this a generic tuple that would fit into the range 1..22? In this case we need to cast it to make the TupleN members accessible. This works only for generic tuples of known size up to 22.

Attributes

def isTransparent(traitOnly: Boolean)(using Context): Boolean

Is this a type deriving only from transparent classes?

Is this a type deriving only from transparent classes?

Value parameters

traitOnly

if true, all class symbols must be transparent traits

Attributes

Is this a large generic tuple and is pat TupleXXL? TupleXXL.unapplySeq extracts values of type TupleXXL but large scrutinee terms are typed as large generic tuples. This allows them to hold on to their precise element types, but it means type-wise, the terms don't conform to the extractor's parameter type, so this method identifies case.

Is this a large generic tuple and is pat TupleXXL? TupleXXL.unapplySeq extracts values of type TupleXXL but large scrutinee terms are typed as large generic tuples. This allows them to hold on to their precise element types, but it means type-wise, the terms don't conform to the extractor's parameter type, so this method identifies case.

Attributes

The TermRef referring to the companion of the underlying class reference of this type, while keeping the same prefix.

The TermRef referring to the companion of the underlying class reference of this type, while keeping the same prefix.

Attributes

def refinedWith(name: Name, info: Type)(using Context): RefinedType

A decorator that provides methods on types that are needed in the transformer pipeline.

A decorator that provides methods on types that are needed in the transformer pipeline.

Attributes

Is this type a methodic type that takes implicit parameters (both old and new) at some point?

Is this type a methodic type that takes implicit parameters (both old and new) at some point?

Attributes

Is this type a methodic type that takes at least one parameter?

Is this type a methodic type that takes at least one parameter?

Attributes

def toNestedPairs(using Context): Type

The *: equivalent of an instance of a Tuple class

The *: equivalent of an instance of a Tuple class

Attributes

The element types of this tuple type, which can be made up of EmptyTuple, TupleX and *: pairs

The element types of this tuple type, which can be made up of EmptyTuple, TupleX and *: pairs

Attributes

def tupleElementTypesUpTo(bound: Int, normalize: Boolean)(using Context): Option[List[Type]]

The element types of this tuple type, which can be made up of EmptyTuple, TupleX and *: pairs

The element types of this tuple type, which can be made up of EmptyTuple, TupleX and *: pairs

Value parameters

bound

The maximum number of elements that needs generating minus 1 The generation will stop once more than bound elems have been generated

normalize

If true, normalize and dealias at each step. If false, never normalize and dealias only to find *: and EmptyTuple types. This is useful for printing.

Attributes

A decorator that provides methods on types that are needed in the transformer pipeline.

A decorator that provides methods on types that are needed in the transformer pipeline.

Attributes