Applications

object Applications
Companion
class
class Object
trait Matchable
class Any

Value members

Concrete methods

def defaultArgument(fn: Tree, n: Int, testOnly: Boolean)(using Context): Tree
def extractorMemberType(tp: Type, name: Name, errorPos: SrcPos)(using Context): Type
def findDefaultGetter(fn: Tree, n: Int, testOnly: Boolean)(using Context): Tree

Find reference to default parameter getter for parameter #n in current parameter list, or NoType if none was found

Find reference to default parameter getter for parameter #n in current parameter list, or NoType if none was found

def getUnapplySelectors(tp: Type, args: List[Tree], pos: SrcPos)(using Context): List[Type]
def isGetMatch(tp: Type, errorPos: SrcPos)(using Context): Boolean

Does tp fit the "get match" conditions as an unapply result type? This is the case of tp has a get member as well as a parameterless isEmpty member of result type Boolean.

Does tp fit the "get match" conditions as an unapply result type? This is the case of tp has a get member as well as a parameterless isEmpty member of result type Boolean.

def isProductMatch(tp: Type, numArgs: Int, errorPos: SrcPos)(using Context): Boolean

Does tp fit the "product match" conditions as an unapply result type for a pattern with numArgs subpatterns? This is the case if tp has members _1 to _N where N == numArgs.

Does tp fit the "product match" conditions as an unapply result type for a pattern with numArgs subpatterns? This is the case if tp has members _1 to _N where N == numArgs.

def isProductSeqMatch(tp: Type, numArgs: Int, errorPos: SrcPos)(using Context): Boolean

Does tp fit the "product-seq match" conditions as an unapply result type for a pattern with numArgs subpatterns? This is the case if (1) tp has members _1 to _N where N <= numArgs + 1. (2) tp._N conforms to Seq match

Does tp fit the "product-seq match" conditions as an unapply result type for a pattern with numArgs subpatterns? This is the case if (1) tp has members _1 to _N where N <= numArgs + 1. (2) tp._N conforms to Seq match

def productArity(tp: Type, errorPos: SrcPos)(using Context): Int
def productSelectorTypes(tp: Type, errorPos: SrcPos)(using Context): List[Type]
def productSeqSelectors(tp: Type, argsNum: Int, pos: SrcPos)(using Context): List[Type]
def unapplyArgs(unapplyResult: Type, unapplyFn: Tree, args: List[Tree], pos: SrcPos)(using Context): List[Type]
def unapplySeqTypeElemTp(getTp: Type)(using Context): Type

If getType is of the form:

If getType is of the form:

{
  def lengthCompare(len: Int): Int // or, def length: Int
  def apply(i: Int): T = a(i)
  def drop(n: Int): scala.collection.Seq[T]
  def toSeq: scala.collection.Seq[T]
}

returns T, otherwise NoType.

def wrapDefs(defs: ListBuffer[Tree], tree: Tree)(using Context): Tree