trait EtaExpansion extends AnyRef

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EtaExpansion
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def etaExpand(unit: Global.CompilationUnit, tree: Global.Tree, typer: Analyzer.Typer): Global.Tree

    Expand partial method application p.f(es_1)...(es_n).

    Expand partial method application p.f(es_1)...(es_n).

    We expand this to the following block, which evaluates the target of the application and its supplied arguments if needed (they are not stable), and then wraps a Function that abstracts over the missing arguments.

    { private synthetic val eta$f = p.f // if p is not stable ... private synthetic val eta$e_i = e_i // if e_i is not stable ... (ps_1 => ... => ps_m => eta$f([es_1])...([es_m])(ps_1)...(ps_m)) }

    This is called from instantiateToMethodType after type checking tree, and we realize we have a method type, where a function type (builtin or SAM) is expected.