TermLambdaType

tastyquery.Types.TermLambdaType
sealed trait TermLambdaType extends LambdaType

Attributes

Graph
Supertypes
trait LambdaType
trait TypeBinder
class TermType
class TypeMappable
class Object
trait Matchable
class Any
Show all
Known subtypes
class MethodType

Members list

Type members

Types

type PInfo = Type
type This >: this.type <: TermLambdaType & ResultType

Inherited types

Attributes

Inherited from:
LambdaType

Value members

Abstract methods

def paramTypes: List[Type]

Concrete methods

final def instantiate(args: List[Type])(using Context): ResultType
final def instantiateParamTypes(args: List[Type])(using Context): List[Type]
protected def newParamRef(n: Int): ParamRefType
final def paramInfos: List[PInfo]

Inherited methods

def asSeenFrom(pre: Prefix, cls: Symbol)(using Context): TypeOrMethodic

Attributes

Inherited from:
TypeOrMethodic

Attributes

Inherited from:
LambdaType

Attributes

Inherited from:
TypeOrMethodic
final def isSubTypeOrMethodic(that: TypeOrMethodic)(using Context): Boolean

Attributes

Inherited from:
TypeOrMethodic
final def matches(that: TypeOrMethodic)(using Context): Boolean

Is this type close enough to that type so that members with the two types would override each other?

Is this type close enough to that type so that members with the two types would override each other?

This means:

  • Either both types are polytypes with the same number of type parameters and their result types match after renaming corresponding type parameters
  • Or both types are method types with =:=-equivalent(*) parameter types and matching result types after renaming corresponding parameter types if the method types are dependent.
  • Or both types are =:=-equivalent
  • Or neither type takes term or type parameters.

(*) when matching with a Java method, we also regard Any and Object as equivalent parameter types. (TODO)

This function will always use unsafe-nulls semamtics to check the types. This is because we are using a relaxed rule (ignoring Null types) to check overriding Java methods.

Attributes

Inherited from:
TypeOrMethodic
def paramNames: List[ThisName]

Attributes

Inherited from:
LambdaType

Attributes

Inherited from:
TypeMappable

Attributes

Inherited from:
LambdaType
def showBasic: String

Attributes

Inherited from:
TypeMappable
final def showMultiline: String

Attributes

Inherited from:
TypeMappable
final def widenTermRef(using Context): TermType

Widens TermRefs one level to their underlyingOrMethodic type.

Widens TermRefs one level to their underlyingOrMethodic type.

  • If this term type is a TermRef, returns this.underlyingOrMethodic.
  • Otherwise, returns this.

Attributes

Inherited from:
TermType

Inherited fields

val paramRefs: List[ParamRefType]

Attributes

Inherited from:
LambdaType