Application

dotty.tools.dotc.typer.Applications.Application
abstract class Application[Arg](methRef: TermRef, funType: Type, args: List[Arg], resultType: Type)(using x$5: Context)

Type parameters

Arg

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

Value parameters

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

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class TestApplication[Arg]
class TypedApply[T]
class ApplyToTyped
Show all

Members list

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

Attributes

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

Attributes

protected def appPos: SrcPos

The kind of application that gets typed

The kind of application that gets typed

Attributes

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

Attributes

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

Attributes

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

Attributes

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?

Attributes

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.

Attributes

protected def normalizedFun: Tree

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

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

Attributes

protected def treeToArg(arg: Tree): Arg

Turn a typed tree into an argument

Turn a typed tree into an argument

Attributes

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.

Attributes

Concrete methods

protected def init(): Unit

Is sym a constructor of a Java-defined annotation?

Is sym a constructor of a Java-defined annotation?

Attributes

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

Attributes

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 parameters

n

The position of the first parameter in formals in methType.

Attributes

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.

Attributes

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

Attributes

The application was successful

The application was successful

Attributes

Concrete fields

lazy val liftedFunType: Type
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

Attributes

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.

Attributes