abstract class Application [ Arg ]

Constructors

Application ( methRef: TermRef , funType: Type , args: List [ Arg ] , resultType: Type )
Application ( implicit ctx: Context )

Members

type TypedArg =

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

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

private var _ok : Boolean

A flag signalling that the typechecking the application was so far successful

A flag signalling that the typechecking the application was so far successful

private val args : List [ Arg ]
private implicit val ctx : Context
private val funType : Type
private val methRef : TermRef
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.

private val resultType : Type
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 : Position
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

def findDefaultGetter ( n: Int ) ( implicit ctx: 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

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 init ( ) : Unit
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 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

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.

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

private def methString : String
protected def methodType : MethodType
protected def normalizedFun : Tree

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

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

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

Re-order arguments to correctly align named arguments

Re-order arguments to correctly align named arguments

def spliceMeth ( meth: Tree , app: Tree ) : Tree

Splice new method reference into existing application

Splice new method reference into existing application

def success : Boolean

The application was successful

The application was successful

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.