dotty.tools.dotc.ast

desugar

Related Doc: package ast

object desugar

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. desugar
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. val AccessOrSynthetic: FlagSet

  5. val MaybeFilter: Key[Unit]

    Tags a .withFilter call generated by desugaring a for expression.

    Tags a .withFilter call generated by desugaring a for expression. Such calls can alternatively be rewritten to use filter.

  6. def apply(tree: untpd.Tree)(implicit ctx: Context): untpd.Tree

    Main desugaring method

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def block(tree: untpd.Block)(implicit ctx: Context): untpd.Block

    { stats; <empty > }

    { stats; <empty > }

    > { stats; () }

  9. def checkNotReservedName(mdef: untpd.MemberDef)(implicit ctx: Context): Name

    The name of mdef, after checking that it does not redefine a Scala core class.

    The name of mdef, after checking that it does not redefine a Scala core class. If it does redefine, issue an error and return a mangled name instead of the original one.

  10. def classDef(cdef: untpd.TypeDef)(implicit ctx: Context): untpd.Tree

    The expansion of a class definition.

    The expansion of a class definition. See inline comments for what is involved

  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def defDef(meth: untpd.DefDef, isPrimaryConstructor: Boolean = false)(implicit ctx: Context): untpd.Tree

    Expand context bounds to evidence params.

    Expand context bounds to evidence params. E.g.,

    def f[T >: L <: H : B](params)

    > def f[T >: L <: H](params)(implicit evidence$0: B[T])

    Expand default arguments to default getters. E.g,

    def f[T: B](x: Int = 1)(y: String = x + "m") = ...

    > def f[T](x: Int)(y: String)(implicit evidence$0: B[T]) = ... def f$default$1[T] = 1 def f$default$2[T](x: Int) = x + "m"

  13. def defTree(tree: untpd.Tree)(implicit ctx: Context): untpd.Tree

  14. def derivedTermParam(vdef: untpd.ValDef): untpd.ValDef

    A value definition copied from vdef with a tpt typetree derived from it

  15. def derivedTypeParam(tdef: untpd.TypeDef): untpd.TypeDef

    A type definition copied from tdef with a rhs typetree derived from it

  16. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  18. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  20. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  21. def isDesugaredCaseClassMethodName(name: Name)(implicit ctx: Context): Boolean

    Names of methods that are added unconditionally to case classes

  22. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  23. def makeAnnotated(cls: Symbol, tree: untpd.Tree)(implicit ctx: Context): untpd.Annotated

    Add annotation with class cls to tree: tree @cls

  24. def makeCaseLambda(cases: List[untpd.CaseDef], nparams: Int = 1, unchecked: Boolean = true)(implicit ctx: Context): Function

    If nparams == 1, expand partial function

    If nparams == 1, expand partial function

    { cases }

    > x$1 => (x$1 @unchecked) match { cases }

    If nparams != 1, expand instead to

    (x$1, ..., x$n) => (x$0, ..., x${n-1} @unchecked) match { cases }

  25. def makeClosure(params: List[untpd.ValDef], body: untpd.Tree, tpt: untpd.Tree = TypeTree(), inlineable: Boolean)(implicit ctx: Context): untpd.Block

    Make closure corresponding to function.

    Make closure corresponding to function. params => body

    > def $anonfun(params) = body Closure($anonfun)

    If inlineable is true, tag $anonfun with an @inline annotation.

  26. def makePatDef(original: untpd.Tree, mods: Modifiers, pat: untpd.Tree, rhs: untpd.Tree)(implicit ctx: Context): untpd.Tree

    If pat is a variable pattern,

    If pat is a variable pattern,

    val/var/lazy val p = e

    Otherwise, in case there is exactly one variable x_1 in pattern val/var/lazy val p = e ==> val/var/lazy val x_1 = (e: @unchecked) match (case p => (x_1))

    in case there are zero or more than one variables in pattern val/var/lazy p = e ==> private synthetic [lazy] val t$ = (e: @unchecked) match (case p => (x_1, ..., x_N)) val/var/def x_1 = t$._1 ... val/var/def x_N = t$._N If the original pattern variable carries a type annotation, so does the corresponding ValDef or DefDef.

  27. def makeTupledFunction(params: List[untpd.ValDef], body: untpd.Tree)(implicit ctx: Context): untpd.Tree

    Map n-ary function (p1, ..., pn) => body where n != 1 to unary function as follows:

    Map n-ary function (p1, ..., pn) => body where n != 1 to unary function as follows:

    x$1 => { def p1 = x$1._1 ... def pn = x$1._n body }

  28. def moduleDef(mdef: ModuleDef)(implicit ctx: Context): untpd.Tree

    Expand

    Expand

    object name extends parents { self => body }

    to: <module> val name: name$ = New(name$) <module> final class name$ extends parents { self: name.type => body }

  29. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  30. final def notify(): Unit

    Definition Classes
    AnyRef
  31. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  32. def patDef(pdef: PatDef)(implicit ctx: Context): untpd.Tree

    val p1, ..., pN: T = E

    val p1, ..., pN: T = E

    > makePatDefp1: T1 = E; ...; makePatDefpN: TN = E

  33. def patternVar(tree: untpd.Tree)(implicit ctx: Context): Bind[Untyped]

    Expand variable identifier x to x @ _

  34. def refinedTypeToClass(parent: tpd.Tree, refinements: List[untpd.Tree])(implicit ctx: Context): untpd.TypeDef

    Create a class definition with the same info as the refined type given by parent and refinements.

    Create a class definition with the same info as the refined type given by parent and refinements.

    parent { refinements }

    > trait <refinement> extends core { this: self => refinements }

    Here, core is the (possibly parameterized) class part of parent. If parent is the same as core, self is empty. Otherwise self is parent.

    Example: Given

    class C type T1 = C { type T <: A }

    the refined type

    T1 { type T <: B }

    is expanded to

    trait <refinement> extends C { this: T1 => type T <: A }

    The result of this method is used for validity checking, is thrown away afterwards.

    parent

    The type of parent

  35. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  36. def toString(): String

    Definition Classes
    AnyRef → Any
  37. def typeBoundsTree(tree: untpd.TypeBoundsTree)(implicit ctx: Context): untpd.TypeBoundsTree

    EmptyTree in lower bound ==> Nothing EmptyTree in upper bounds ==> Any

  38. def typeDef(tdef: untpd.TypeDef)(implicit ctx: Context): untpd.Tree

    Fill in empty type bounds with Nothing/Any.

    Fill in empty type bounds with Nothing/Any. Expand private local type parameters as follows:

    class C[v T]

    > class C { type v C$T; type v T = C$T }

  39. def valDef(vdef: untpd.ValDef)(implicit ctx: Context): untpd.Tree

    var x: Int = expr

    var x: Int = expr

    > def x: Int = expr def x_=($1: <TypeTree()>): Unit = ()

  40. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped