ApplyMethods

Extension methods of Apply

Source:
Quotes.scala

Extensions

Extensions

extension (self: Apply)
def args: List[Term]

The arguments (implicitly) passed to the method

The arguments (implicitly) passed to the method

The Apply may be a partially applied method:

package scala.quoted
trait Snippet0 { self: runtime.QuoteUnpickler & scala.quoted.runtime.QuoteMatching &    scala.quoted.Quotes =>
  val QuoteUnpickler = self
  val QuoteMatching = self
  val Quotes = self
  trait Snippet1 { self: Quotes.reflect.type /*Quotes.reflectModule*/ &    Quotes.reflectModule =>
    val reflect = self
    val reflectModule = self
    trait Snippet2 { self: reflectModule.ApplyMethods =>
      val ApplyMethods = self
      def f(x1: Int)(x2: Int) = ???
      f(1)(2)
    }
  }
}
  • args is (2) in the Apply of f(1)(2)
  • args is (1) in the Apply of f(1)
Source:
Quotes.scala
def fun: Term

The fun part of an (implicit) application like fun(args)

The fun part of an (implicit) application like fun(args)

It may be a partially applied method:

package scala.quoted
trait Snippet0 { self: runtime.QuoteUnpickler & scala.quoted.runtime.QuoteMatching &    scala.quoted.Quotes =>
  val QuoteUnpickler = self
  val QuoteMatching = self
  val Quotes = self
  trait Snippet1 { self: Quotes.reflect.type /*Quotes.reflectModule*/ &    Quotes.reflectModule =>
    val reflect = self
    val reflectModule = self
    trait Snippet2 { self: reflectModule.ApplyMethods =>
      val ApplyMethods = self
      def f(x1: Int)(x2: Int) = ???
      f(1)(2)
    }
  }
}
  • fun is f(1) in the Apply of f(1)(2)
  • fun is f in the Apply of f(1)
Source:
Quotes.scala