Type
extends ObjectSupertypes
ObjectMembers
extension_<:<
( self: Type ) ( that: Type ) ( implicit ctx: Context ) : BooleanIs this type a subtype of that type?
Is this type a subtype of that type?
extension_=:=
( self: Type ) ( that: Type ) ( implicit ctx: Context ) : BooleanIs self
type the same as that
type?
This is the case iff self <:< that
and that <:< self
.
Is self
type the same as that
type?
This is the case iff self <:< that
and that <:< self
.
extension_baseClasses
( self: Type ) ( implicit ctx: Context ) : List[Symbol]The base classes of this type with the class itself as first element.
The base classes of this type with the class itself as first element.
extension_baseType
( self: Type ) ( cls: Symbol ) ( implicit ctx: Context ) : TypeThe least type instance of given class which is a super-type of this type. Example: {{{ class D[T] class C extends p.D[Int] ThisType(C).baseType(D) = p.D[Int] }}...
The least type instance of given class which is a super-type of this type. Example: {{{ class D[T] class C extends p.D[Int] ThisType(C).baseType(D) = p.D[Int] }}}
extension_dealias
( self: Type ) ( implicit ctx: Context ) : TypeFollow aliases and dereferences LazyRefs, annotated types and instantiated TypeVars until type is no longer alias type, annotated type, LazyRef, or inst...
Follow aliases and dereferences LazyRefs, annotated types and instantiated TypeVars until type is no longer alias type, annotated type, LazyRef, or instantiated type variable.
extension_derivesFrom
( self: Type ) ( cls: Symbol ) ( implicit ctx: Context ) : BooleanIs this type an instance of a non-bottom subclass of the given class cls
?
Is this type an instance of a non-bottom subclass of the given class cls
?
extension_isContextFunctionType
( self: Type ) ( implicit ctx: Context ) : BooleanIs this type an context function type?
Is this type an context function type?
extension_isDependentFunctionType
( self: Type ) ( implicit ctx: Context ) : BooleanIs this type a dependent function type?
Is this type a dependent function type?
extension_isErasedFunctionType
( self: Type ) ( implicit ctx: Context ) : BooleanIs this type an erased function type?
Is this type an erased function type?
extension_isFunctionType
( self: Type ) ( implicit ctx: Context ) : BooleanIs this type a function type?
Is this type a function type?
extension_seal
( self: Type ) ( implicit ctx: Context ) : Type[Nothing <: AnyKind]Convert Type
to an quoted.Type[_]
Convert Type
to an quoted.Type[_]
extension_select
( self: Type ) ( sym: Symbol ) ( implicit ctx: Context ) : TypeThe type <this . sym>, reduced if possible
The type <this . sym>, reduced if possible
extension_simplified
( self: Type ) ( implicit ctx: Context ) : TypeA simplified version of this type which is equivalent wrt =:= to this type. Reduces typerefs, applied match types, and and or types.
A simplified version of this type which is equivalent wrt =:= to this type. Reduces typerefs, applied match types, and and or types.
extension_widen
( self: Type ) ( implicit ctx: Context ) : TypeWiden from singleton type to its underlying non-singleton
base type by applying one or more underlying
dereferences,
Also go from => T to T.
Identity for...
Widen from singleton type to its underlying non-singleton
base type by applying one or more underlying
dereferences,
Also go from => T to T.
Identity for all other types. Example:
class Outer { class C ; val x: C } def o: Outer <o.x.type>.widen = o.C