CustomTransientGroundType

abstract

Superclass for custom transient ground types used by custom algorithms.

When writing algorithms that manipulate Types, it is sometimes useful to temporarily store custom data in place of Types. This can be done by defining a subclass of CustomTransientGroundType. At the end of the day, all CustomTransientGroundTypes should have been replaced by proper Types.

The methods of tasty-query never expose instances of CustomTransientGroundType, but you may use it for your own purposes.

When permorming an exhaustive match on all possible Types, you should cover CustomTransientGroundType in a case that always throws (unless you are actually using it for some purposes):

val tpe: Type = ...
tpe match
 case tpe: TypeRef => ...
 ...
 case tpe: CustomTransientGroundType =>
   throw AssertionError(s"Unexpected custom transient ground type $tpe")
end match
class Type
class Object
trait Matchable
class Any

Type members

Inherited types

Inherited from
Type

Value members

Inherited methods

final
def &(that: Type)(using Context): Type
Inherited from
Type
final
def appliedTo(args: List[Type])(using Context): Type

The type representing

The type representing

T[U1, ..., Un]

where

Value Params
args

= U1,...,Un

this

= T

Inherited from
Type
final
def asSeenFrom(pre: Type, cls: Symbol)(using Context): Type
Inherited from
Type
final
def baseType(base: Symbol)(using Context): Type

The basetype of this type with given class symbol, NoType if base is not a class.

The basetype of this type with given class symbol, NoType if base is not a class.

Inherited from
Type
final
def dealias(using Context): Type
Inherited from
Type
final
def isExactlyNothing(using Context): Boolean

Is this type exactly Nothing (no vars, aliases, refinements etc allowed)?

Is this type exactly Nothing (no vars, aliases, refinements etc allowed)?

Inherited from
Type
final
def isOfClass(sym: Symbol)(using Context): Boolean
Inherited from
Type
final
def isRef(sym: Symbol)(using Context): Boolean
Inherited from
Type
final
def member(name: Name)(using Context): Symbol

The member with the given name.

The member with the given name.

Inherited from
Type
@tailrec
final

The normalized prefix of this type is:

The normalized prefix of this type is:

  • For a type alias, the normalized prefix of its alias.
  • For all other named type and class infos: the prefix.
  • Inherited by all other type proxies.
  • NoType for all other types.
Inherited from
Type
final
def select(sym: Symbol)(using Context): Type
Inherited from
Type
final
def widen(using Context): Type

Widen singleton types, ExprTypes, AnnotatedTypes and RefinedTypes.

Widen singleton types, ExprTypes, AnnotatedTypes and RefinedTypes.

Inherited from
Type
final

Widen from ExprType type to its result type.

Widen from ExprType type to its result type.

For all other types, return this.

Inherited from
Type
final
def |(that: Type)(using Context): Type
Inherited from
Type