LambdaType

tastyquery.Types.LambdaType
sealed trait LambdaType extends TypeOrMethodic, ParamRefBinder

Attributes

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

Members list

Type members

Types

type PInfo <: Type | TypeBounds
type This >: this.type <: LambdaType { type PInfo = PInfo; } & ResultType
type ThisName <: Name

Value members

Abstract methods

protected def newParamRef(n: Int): ParamRefType
def paramInfos: List[PInfo]
def paramNames: List[ThisName]

Inherited methods

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

Attributes

Inherited from:
TypeOrMethodic

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

Attributes

Inherited from:
TypeMappable
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

Concrete fields

val paramRefs: List[ParamRefType]