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

type TypedArg

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 def appPos: SrcPos

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 def harmonizeArgs(args: List[TypedArg]): List[TypedArg]

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 def normalizedFun: Tree

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 def methodType: MethodType
protected def needLiftFun: Boolean

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 val methType: Type

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 val orderedArgs: List[Arg]

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.