Application

abstract
class Application[Arg](methRef: TermRef, funType: Type, args: List[Arg], resultType: Type)(using x$5: Context)
Type Params
Arg

the type of arguments, could be tpd.Tree, untpd.Tree, or Type

Value Params
args

the arguments of the application

funType

the type of the function part of the application

methRef

the reference to the method of the application

resultType

the expected result type of the application

class Object
trait Matchable
class Any

Type members

Types

The type of typed arguments: either tpd.Tree or Type

The type of typed arguments: either tpd.Tree or Type

Value members

Abstract methods

protected
def addArg(arg: TypedArg, formal: Type): Unit

Check that argument corresponds to type formal and possibly add it to the list of adapted arguments

Check that argument corresponds to type formal and possibly add it to the list of adapted arguments

protected

The kind of application that gets typed

The kind of application that gets typed

protected
def fail(msg: Message, arg: Arg): Unit

Signal failure with given message at position of given argument

Signal failure with given message at position of given argument

protected
def fail(msg: Message): Unit

Signal failure with given message at position of the application itself

Signal failure with given message at position of the application itself

protected

If all args have primitive numeric types, make sure it's the same one

If all args have primitive numeric types, make sure it's the same one

protected
def isVarArg(arg: Arg): Boolean

Is this an argument of the form expr: _* or a RepeatedParamType derived from such an argument?

Is this an argument of the form expr: _* or a RepeatedParamType derived from such an argument?

protected
def makeVarArg(n: Int, elemFormal: Type): Unit

If constructing trees, turn last n processed arguments into a SeqLiteral tree with element type elemFormal.

If constructing trees, turn last n processed arguments into a SeqLiteral tree with element type elemFormal.

protected

The current function part, which might be affected by lifting.

The current function part, which might be affected by lifting.

protected
def treeToArg(arg: Tree): Arg

Turn a typed tree into an argument

Turn a typed tree into an argument

protected
def typeOfArg(arg: Arg): Type
protected
def typedArg(arg: Arg, formal: Type): TypedArg

Given an original argument and the type of the corresponding formal parameter, produce a typed argument.

Given an original argument and the type of the corresponding formal parameter, produce a typed argument.

Concrete methods

protected
def init(): Unit

Is sym a constructor of a Java-defined annotation?

Is sym a constructor of a Java-defined annotation?

protected
def liftFun(): Unit

If constructing trees, pull out all parts of the function which are not idempotent into separate prefix definitions

If constructing trees, pull out all parts of the function which are not idempotent into separate prefix definitions

def matchArgs(args: List[Arg], formals: List[Type], n: Int): Unit

Match re-ordered arguments against formal parameters

Match re-ordered arguments against formal parameters

Value Params
n

The position of the first parameter in formals in methType.

protected
protected

Whether liftFun is needed? It is the case if default arguments are used.

Whether liftFun is needed? It is the case if default arguments are used.

def ok: Boolean
def ok_=(x: Boolean): Unit
def reorder[T >: Untyped](args: List[Tree[T]]): List[Tree[T]]

Re-order arguments to correctly align named arguments

Re-order arguments to correctly align named arguments

The application was successful

The application was successful

Concrete fields

lazy

The function's type after widening and instantiating polytypes with TypeParamRefs in constraint set

The function's type after widening and instantiating polytypes with TypeParamRefs in constraint set

lazy

The arguments re-ordered so that each named argument matches the same-named formal parameter.

The arguments re-ordered so that each named argument matches the same-named formal parameter.