TypeOps
extends Object with SerializableSupertypes
Object, SerializableMembers
<:<
( self: Type ) ( that: Type ) ( implicit ctx: Context ) : BooleanIs this type a subtype of that type?
Is this type a subtype of that type?
=:=
( 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.
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.
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?
isContextFunctionType
( self: Type ) ( implicit ctx: Context ) : BooleanIs this type an context function type?
Is this type an context function type?
isDependentFunctionType
( self: Type ) ( implicit ctx: Context ) : BooleanIs this type a dependent function type?
Is this type a dependent function type?
isErasedFunctionType
( self: Type ) ( implicit ctx: Context ) : BooleanIs this type an erased function type?
Is this type an erased function type?
isFunctionType
( self: Type ) ( implicit ctx: Context ) : BooleanIs this type a function type?
Is this type a function type?
seal
( self: Type ) ( implicit ctx: Context ) : Type[Nothing <: AnyKind]Convert Type to an quoted.Type[_]
Convert Type to an quoted.Type[_]
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.
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