AppliedType

final
class AppliedType(val tycon: Type, val args: List[Type]) extends TypeProxy with ValueType

A type application C[T_1, ..., T_n] Typebounds for wildcard application: C[_], C[?]

trait ValueType
trait TermType
class TypeProxy
class Type
class Object
trait Matchable
class Any

Type members

Inherited types

Inherited from
Type

Value members

Concrete methods

override
def superType(using Context): Type
Definition Classes
override
def toString(): String
Definition Classes
Any
override
Definition Classes
override
def underlying(using Context): Type
Definition Classes

Inherited methods

final
def &(that: Type)(using Context): Type
Inherited from
Type
final
def appliedTo(tpe: 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: ClassSymbol)(using Context): Type

The basetype of this type with given class symbol.

The basetype of this type with given class symbol.

Returns NoType if this type does not have base in any of its base types.

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 isSameType(that: Type)(using Context): Boolean
Inherited from
Type
final
def isSubtype(that: Type)(using Context): Boolean
Inherited from
Type
final
def matches(that: Type)(using Context): Boolean

Is this type close enough to that type so that members with the two types would override each other?

Is this type close enough to that type so that members with the two types would override each other?

This means:

  • Either both types are polytypes with the same number of type parameters and their result types match after renaming corresponding type parameters
  • Or both types are method types with =:=-equivalent(*) parameter types and matching result types after renaming corresponding parameter types if the method types are dependent.
  • Or both types are =:=-equivalent
  • Or neither type takes term or type parameters.

(*) when matching with a Java method, we also regard Any and Object as equivalent parameter types. (TODO)

This function will always use unsafe-nulls semamtics to check the types. This is because we are using a relaxed rule (ignoring Null types) to check overriding Java methods.

Inherited from
Type
final
def matchesLoosely(that: Type)(using Context): Boolean

This is the same as matches except that it also matches => T with T and vice versa.

This is the same as matches except that it also matches => T with T and vice versa.

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
final
def memberType(member: TermSymbol)(using Context): Type
Inherited from
Type
Inherited from
Type
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(name: TypeName)(using Context): TypeRef
Inherited from
Type
final
def select(name: TermName)(using Context): TermRef
Inherited from
Type
final
def select(name: Name)(using Context): NamedType
Inherited from
Type
final
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

Concrete fields

val args: List[Type]
val tycon: Type