Applications

dotty.tools.dotc.typer.Applications
See theApplications companion trait
object Applications

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

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 EmptyTree if none was found.

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

Value parameters

fn

the tree referring to the function part of this call

n

the index of the parameter in the parameter list of the call

testOnly

true iff we just to find out whether a getter exists

Attributes

def findDefaultGetter(meth: TermSymbol, receiver: Tree, idx: Int)(using Context): Tree

Find reference to default parameter getter for method meth numbered idx selected from given receiver, or EmptyTree if none was found.

Find reference to default parameter getter for method meth numbered idx selected from given receiver, or EmptyTree if none was found.

Value parameters

idx

the index of the searched for default getter, as encoded in its name

meth

the called method (can be mapped by resolveMapped)

receiver

the receiver of the original method call, which determines where default getters are found

Attributes

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.

Attributes

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.

Attributes

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

Attributes

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 retypeSignaturePolymorphicFn(fun: Tree, methType: Type)(using Context): Tree
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.

Attributes

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